flex.messaging.io
Class TypeMarshallingContext

java.lang.Object
  extended by flex.messaging.io.TypeMarshallingContext

public class TypeMarshallingContext
extends Object

A simple context to hold type marshalling specific settings.


Constructor Summary
TypeMarshallingContext()
          Constructs a default type marshalling context.
 
Method Summary
static void clearThreadLocalObjects()
          Clears out the thread local state after the request completes.
 ClassLoader getClassLoader()
          Returns the custom ClassLoader for this type marshalling session, or defaults to the current MessageBroker's ClassLoader if none has been set.
 IdentityHashMap getKnownObjects()
          A map of known objects already encountered in this type marshalling session.
static String getType(Object obj)
          A utility method to determine whether an anonymous type specifies a strong type name, such as ASObject.getType() or the legacy Flash Remoting convention of using a _remoteClass property.
static TypeMarshaller getTypeMarshaller()
           
static TypeMarshallingContext getTypeMarshallingContext()
           
 void reset()
          Resets the list of known objects.
 void setClassLoader(ClassLoader loader)
          Sets a custom classloader for this type marshalling session that will be used to create new instances of strongly typed objects.
 void setKnownObjects(IdentityHashMap knownObjects)
          Sets the list of the objects already encountered for this type marshalling session.
static void setTypeMarshaller(TypeMarshaller marshaller)
          Establishes a TypeMarshallingContext for the current thread.
static void setTypeMarshallingContext(TypeMarshallingContext context)
          Establishes a TypeMarshallingContext for the current thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMarshallingContext

public TypeMarshallingContext()
Constructs a default type marshalling context.

Method Detail

setTypeMarshallingContext

public static void setTypeMarshallingContext(TypeMarshallingContext context)
Establishes a TypeMarshallingContext for the current thread. Users are not expected to call this function.

Parameters:
context - The current TypeMarshallingContext.

getTypeMarshallingContext

public static TypeMarshallingContext getTypeMarshallingContext()
Returns:
The current thread's TypeMarshallingContext.

setTypeMarshaller

public static void setTypeMarshaller(TypeMarshaller marshaller)
Establishes a TypeMarshallingContext for the current thread. Users are not expected to call this function.

Parameters:
marshaller - The current TypeMarshaller.

getTypeMarshaller

public static TypeMarshaller getTypeMarshaller()
Returns:
The current thread's TypeMarshaller.

getClassLoader

public ClassLoader getClassLoader()
Returns the custom ClassLoader for this type marshalling session, or defaults to the current MessageBroker's ClassLoader if none has been set.


setClassLoader

public void setClassLoader(ClassLoader loader)
Sets a custom classloader for this type marshalling session that will be used to create new instances of strongly typed objects.


getKnownObjects

public IdentityHashMap getKnownObjects()
A map of known objects already encountered in this type marshalling session.


setKnownObjects

public void setKnownObjects(IdentityHashMap knownObjects)
Sets the list of the objects already encountered for this type marshalling session.


reset

public void reset()
Resets the list of known objects.


getType

public static String getType(Object obj)
A utility method to determine whether an anonymous type specifies a strong type name, such as ASObject.getType() or the legacy Flash Remoting convention of using a _remoteClass property.

Returns:
The name of the strong type, or null if none was specified.

clearThreadLocalObjects

public static void clearThreadLocalObjects()
Clears out the thread local state after the request completes.



Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/TypeMarshallingContext.html