com.google.gwt.user.client.rpc.impl
Class SerializerBase

java.lang.Object
  extended by com.google.gwt.user.client.rpc.impl.SerializerBase
All Implemented Interfaces:
Serializer

public abstract class SerializerBase
extends java.lang.Object
implements Serializer

Maps class literals to type signatures and type signatures to serialization methods. Relies on monotonic behavior of hashcodes in web mode defined in Impl.getHashCode(Object) In hosted mode, we map the underlying signature JsArray onto a proper IdentityHashMap.


Constructor Summary
SerializerBase()
           
 
Method Summary
 void deserialize(SerializationStreamReader stream, java.lang.Object instance, java.lang.String typeSignature)
          Restore an instantiated object from the serialized stream.
 java.lang.String getSerializationSignature(java.lang.Class<?> clazz)
          Return the serialization signature for the given type.
 java.lang.Object instantiate(SerializationStreamReader stream, java.lang.String typeSignature)
          Instantiate an object of the given typeName from the serialized stream.
 void serialize(SerializationStreamWriter stream, java.lang.Object instance, java.lang.String typeSignature)
          Save an instance into the serialization stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializerBase

public SerializerBase()
Method Detail

deserialize

public final void deserialize(SerializationStreamReader stream,
                              java.lang.Object instance,
                              java.lang.String typeSignature)
                       throws SerializationException
Description copied from interface: Serializer
Restore an instantiated object from the serialized stream.

Specified by:
deserialize in interface Serializer
Throws:
SerializationException

getSerializationSignature

public final java.lang.String getSerializationSignature(java.lang.Class<?> clazz)
Description copied from interface: Serializer
Return the serialization signature for the given type.

Specified by:
getSerializationSignature in interface Serializer

instantiate

public final java.lang.Object instantiate(SerializationStreamReader stream,
                                          java.lang.String typeSignature)
                                   throws SerializationException
Description copied from interface: Serializer
Instantiate an object of the given typeName from the serialized stream.

Specified by:
instantiate in interface Serializer
Throws:
SerializationException

serialize

public final void serialize(SerializationStreamWriter stream,
                            java.lang.Object instance,
                            java.lang.String typeSignature)
                     throws SerializationException
Description copied from interface: Serializer
Save an instance into the serialization stream.

Specified by:
serialize in interface Serializer
Throws:
SerializationException