flex.messaging.io
Class SerializationProxy

java.lang.Object
  extended by flex.messaging.io.AbstractProxy
      extended by flex.messaging.io.BeanProxy
          extended by flex.messaging.io.MapProxy
              extended by flex.messaging.io.SerializationProxy
All Implemented Interfaces:
PropertyProxy, Externalizable, Serializable, Cloneable

public class SerializationProxy
extends MapProxy
implements Externalizable

This class is the server side portion of a custom serialization mechanism to support partial serialization of Objects. The client uses the Externalizable interface to guarantee the serialization order of the properties. The name of the remote class is the first property send as it is needed to construct an object shell before deserializing any of the wrapped instance properties so that object references are correctly restored.

See Also:
Serialized Form

Constructor Summary
SerializationProxy()
          Default constructor required for deserialization of client SerializationProxy instances.
SerializationProxy(Object defaultInstance)
           
 
Method Summary
 Object clone()
          Returns a copy of the PropertyProxy so that it can be used as a template without modifying/creating global references to instances, descriptors etc.
 boolean isExternalizable()
          Specifies whether the default instance manages its own serialization through the Externalizable interface.
 boolean isExternalizable(Object instance)
          Specifies whether the given instance manages its own serialization through the Externalizable interface.
 void readExternal(ObjectInput in)
           
 String toString()
          A string including the default instance, class and descriptor info
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class flex.messaging.io.MapProxy
getPropertyNames, getValue, setValue
 
Methods inherited from class flex.messaging.io.BeanProxy
addIgnoreProperty, clear, getAlias, getType, isPropertyIgnored, isPublicAccessor, isPublicField
 
Methods inherited from class flex.messaging.io.AbstractProxy
createInstance, createInstanceFromClassName, getAlias, getClassFromClassName, getClassFromClassName, getDefaultInstance, getDescriptor, getIncludeReadOnly, getInstanceToSerialize, getPropertyNames, getSerializationContext, getType, getValue, instanceComplete, isDynamic, setAlias, setDefaultInstance, setDescriptor, setDynamic, setExternalizable, setIncludeReadOnly, setSerializationContext, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializationProxy

public SerializationProxy()
Default constructor required for deserialization of client SerializationProxy instances. A SerializationProxy is merely a utility wrapper on the server side which is discarded once the externalizable information has been read and the wrapped instance constructed.


SerializationProxy

public SerializationProxy(Object defaultInstance)
Method Detail

isExternalizable

public boolean isExternalizable()
Description copied from class: AbstractProxy
Specifies whether the default instance manages its own serialization through the Externalizable interface.

Specified by:
isExternalizable in interface PropertyProxy
Overrides:
isExternalizable in class AbstractProxy
Returns:
Whether the default instance implements java.io.Externalizable.

isExternalizable

public boolean isExternalizable(Object instance)
Description copied from class: AbstractProxy
Specifies whether the given instance manages its own serialization through the Externalizable interface.

Specified by:
isExternalizable in interface PropertyProxy
Overrides:
isExternalizable in class AbstractProxy
Parameters:
instance - the object to check
Returns:
Whether the given instance implements java.io.Externalizable.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

toString

public String toString()
Description copied from class: AbstractProxy
A string including the default instance, class and descriptor info

Overrides:
toString in class AbstractProxy
Returns:
debug string.

clone

public Object clone()
Returns a copy of the PropertyProxy so that it can be used as a template without modifying/creating global references to instances, descriptors etc.

Specified by:
clone in interface PropertyProxy
Overrides:
clone in class MapProxy
Returns:
A copy of the PropertyProxy.


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/SerializationProxy.html