com.caucho.burlap.io
Class SerializerFactory
java.lang.Object
com.caucho.burlap.io.SerializerFactory
- public class SerializerFactory
- extends java.lang.Object
Factory for returning serialization methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serializerMap
private static java.util.HashMap serializerMap
deserializerMap
private static java.util.HashMap deserializerMap
typeMap
private static java.util.HashMap typeMap
defaultSerializer
private Serializer defaultSerializer
SerializerFactory
public SerializerFactory()
getSerializer
public Serializer getSerializer(java.lang.Class cl)
throws BurlapProtocolException
- Returns the serializer for a class.
- Parameters:
cl
- the class of the object that needs to be serialized.
- Returns:
- a serializer object which is do the serialization.
- Throws:
BurlapProtocolException
getDefaultSerializer
public Serializer getDefaultSerializer(java.lang.Class cl)
getDeserializer
public Deserializer getDeserializer(java.lang.Class cl)
throws BurlapProtocolException
- Throws:
BurlapProtocolException
readList
public java.lang.Object readList(AbstractBurlapInput in,
int length,
java.lang.String type)
throws BurlapProtocolException,
java.io.IOException
- Throws:
BurlapProtocolException
java.io.IOException
readMap
public java.lang.Object readMap(AbstractBurlapInput in,
java.lang.String type)
throws BurlapProtocolException,
java.io.IOException
- Throws:
BurlapProtocolException
java.io.IOException
getObjectDeserializer
public Deserializer getObjectDeserializer(java.lang.String type)
throws BurlapProtocolException
- Throws:
BurlapProtocolException
getDeserializer
public Deserializer getDeserializer(java.lang.String type)
throws BurlapProtocolException
- Throws:
BurlapProtocolException
addBasic
private static void addBasic(java.lang.Class cl,
java.lang.String typeName,
int type)