|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.io.mapping.AbstractClassMapping
org.spicefactory.cinnamon.io.mapping.ExternalizableClassMapping
public class ExternalizableClassMapping
ClassMapping implementation responsible for mapping ActionScript classes that implement
flash.utils.IExternalizable. Additionally these classes must have an alias registered in
ActionScript with flash.net.registerClassAlias or the [RemoteClass] metadata tag
(which only works in Flex applications).
This implementation basically just delegates the task of encoding/decoding the object to/from
AMF3 binary data to the classes that implement Externalizable or Externalizer
| Constructor Summary | |
|---|---|
ExternalizableClassMapping(String alias,
String actionScriptClass,
Class<?> javaClass,
Class<?> javaFactory,
Class<?> externalizerClass)
|
|
| Method Summary | |
|---|---|
void |
init(CinnamonConfig config)
Initialization method that will be called once for each ClassMapping instance at application startup. |
Object |
newJavaInstance()
Creates a new instance of the mapped Java class. |
void |
readObject(Object instance,
AMFInput input,
ObjectEncoding encoding,
String[] propertyNames)
Restores the content of the given object from the AMFInput instance. |
String |
toString()
|
void |
writeObject(Object instance,
AMFOutput output)
Writes the content of the specified object to the given AMFOutput. |
| Methods inherited from class org.spicefactory.cinnamon.io.mapping.AbstractClassMapping |
|---|
getActionScriptClass, getAlias, getEncoding, getJavaClass, getJavaFactory, getPropertyNames, setPropertyNames, writeClassDescriptor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalizableClassMapping(String alias,
String actionScriptClass,
Class<?> javaClass,
Class<?> javaFactory,
Class<?> externalizerClass)
| Method Detail |
|---|
public void init(CinnamonConfig config)
ClassMapping
config - the Cinnamon configuration instancepublic Object newJavaInstance()
ClassMapping
public void readObject(Object instance,
AMFInput input,
ObjectEncoding encoding,
String[] propertyNames)
ClassMapping
instance - the object to be restoredinput - the AMF3 data to read fromencoding - the type of object encoding to usepropertyNames - the names of the properties of the object (may be empty for some kinds of mappings)
public void writeObject(Object instance,
AMFOutput output)
ClassMapping
instance - the object to be serializedoutput - the output to write topublic String toString()
toString in class AbstractClassMapping
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||