|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.hessian.io.AbstractSerializerFactory
com.caucho.hessian.io.SerializerFactory
public class SerializerFactory
Factory for returning serialization methods.
Field Summary | |
---|---|
protected CollectionSerializer |
_collectionSerializer
|
protected Serializer |
_defaultSerializer
|
protected java.util.ArrayList |
_factories
|
protected MapSerializer |
_mapSerializer
|
Constructor Summary | |
---|---|
SerializerFactory()
|
|
SerializerFactory(java.lang.ClassLoader loader)
|
Method Summary | |
---|---|
void |
addFactory(AbstractSerializerFactory factory)
Adds a factory. |
java.lang.ClassLoader |
getClassLoader()
|
protected Deserializer |
getDefaultDeserializer(java.lang.Class cl)
Returns the default serializer for a class that isn't matched directly. |
protected Serializer |
getDefaultSerializer(java.lang.Class cl)
Returns the default serializer for a class that isn't matched directly. |
Deserializer |
getDeserializer(java.lang.Class cl)
Returns the deserializer for a class. |
Deserializer |
getDeserializer(java.lang.String type)
Returns a deserializer based on a string type. |
Deserializer |
getListDeserializer(java.lang.String type)
Reads the object as a map. |
Deserializer |
getListDeserializer(java.lang.String type,
java.lang.Class cl)
Reads the object as a map. |
Deserializer |
getObjectDeserializer(java.lang.String type)
Reads the object as a map. |
Deserializer |
getObjectDeserializer(java.lang.String type,
java.lang.Class cl)
Reads the object as a map. |
Serializer |
getSerializer(java.lang.Class cl)
Returns the serializer for a class. |
boolean |
isAllowNonSerializable()
If true, non-serializable objects are allowed. |
java.lang.Object |
readList(AbstractHessianInput in,
int length,
java.lang.String type)
Reads the object as a list. |
java.lang.Object |
readMap(AbstractHessianInput in,
java.lang.String type)
Reads the object as a map. |
java.lang.Object |
readObject(AbstractHessianInput in,
java.lang.String type,
java.lang.String[] fieldNames)
Reads the object as a map. |
void |
setAllowNonSerializable(boolean allow)
If true, non-serializable objects are allowed. |
void |
setSendCollectionType(boolean isSendType)
Set true if the collection serializer should send the java type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Serializer _defaultSerializer
protected java.util.ArrayList _factories
protected CollectionSerializer _collectionSerializer
protected MapSerializer _mapSerializer
Constructor Detail |
---|
public SerializerFactory()
public SerializerFactory(java.lang.ClassLoader loader)
Method Detail |
---|
public java.lang.ClassLoader getClassLoader()
public void setSendCollectionType(boolean isSendType)
public void addFactory(AbstractSerializerFactory factory)
public void setAllowNonSerializable(boolean allow)
public boolean isAllowNonSerializable()
public Serializer getSerializer(java.lang.Class cl) throws HessianProtocolException
getSerializer
in class AbstractSerializerFactory
cl
- the class of the object that needs to be serialized.
HessianProtocolException
protected Serializer getDefaultSerializer(java.lang.Class cl)
cl
- the class of the object that needs to be serialized.
public Deserializer getDeserializer(java.lang.Class cl) throws HessianProtocolException
getDeserializer
in class AbstractSerializerFactory
cl
- the class of the object that needs to be deserialized.
HessianProtocolException
protected Deserializer getDefaultDeserializer(java.lang.Class cl)
cl
- the class of the object that needs to be serialized.
public java.lang.Object readList(AbstractHessianInput in, int length, java.lang.String type) throws HessianProtocolException, java.io.IOException
HessianProtocolException
java.io.IOException
public java.lang.Object readMap(AbstractHessianInput in, java.lang.String type) throws HessianProtocolException, java.io.IOException
HessianProtocolException
java.io.IOException
public java.lang.Object readObject(AbstractHessianInput in, java.lang.String type, java.lang.String[] fieldNames) throws HessianProtocolException, java.io.IOException
HessianProtocolException
java.io.IOException
public Deserializer getObjectDeserializer(java.lang.String type, java.lang.Class cl) throws HessianProtocolException
HessianProtocolException
public Deserializer getObjectDeserializer(java.lang.String type) throws HessianProtocolException
HessianProtocolException
public Deserializer getListDeserializer(java.lang.String type, java.lang.Class cl) throws HessianProtocolException
HessianProtocolException
public Deserializer getListDeserializer(java.lang.String type) throws HessianProtocolException
HessianProtocolException
public Deserializer getDeserializer(java.lang.String type) throws HessianProtocolException
HessianProtocolException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |