public class SerializerFactory extends AbstractSerializerFactory
| Constructor and Description |
|---|
SerializerFactory() |
SerializerFactory(ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFactory(AbstractSerializerFactory factory)
Adds a factory.
|
ClassLoader |
getClassLoader() |
Deserializer |
getDeserializer(Class cl)
Returns the deserializer for a class.
|
Deserializer |
getDeserializer(String type)
Returns a deserializer based on a string type.
|
Deserializer |
getListDeserializer(String type)
Reads the object as a map.
|
Deserializer |
getListDeserializer(String type,
Class cl)
Reads the object as a map.
|
Deserializer |
getObjectDeserializer(String type)
Reads the object as a map.
|
Deserializer |
getObjectDeserializer(String type,
Class cl)
Reads the object as a map.
|
Serializer |
getSerializer(Class cl)
Returns the serializer for a class.
|
boolean |
isAllowNonSerializable()
If true, non-serializable objects are allowed.
|
Object |
readList(AbstractHessianInput in,
int length,
String type)
Reads the object as a list.
|
Object |
readMap(AbstractHessianInput in,
String type)
Reads the object as a map.
|
Object |
readMap(AbstractHessianInput in,
String type,
Class<?> expectKeyType,
Class<?> expectValueType)
Reads the object as a map.
|
Object |
readObject(AbstractHessianInput in,
String type,
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.
|
public SerializerFactory()
public SerializerFactory(ClassLoader loader)
public ClassLoader getClassLoader()
public void setSendCollectionType(boolean isSendType)
public void addFactory(AbstractSerializerFactory factory)
public boolean isAllowNonSerializable()
public void setAllowNonSerializable(boolean allow)
public Serializer getSerializer(Class cl) throws HessianProtocolException
getSerializer in class AbstractSerializerFactorycl - the class of the object that needs to be serialized.HessianProtocolExceptionpublic Deserializer getDeserializer(Class cl) throws HessianProtocolException
getDeserializer in class AbstractSerializerFactorycl - the class of the object that needs to be deserialized.HessianProtocolExceptionpublic Object readList(AbstractHessianInput in, int length, String type) throws HessianProtocolException, IOException
HessianProtocolExceptionIOExceptionpublic Object readMap(AbstractHessianInput in, String type) throws HessianProtocolException, IOException
HessianProtocolExceptionIOExceptionpublic Object readMap(AbstractHessianInput in, String type, Class<?> expectKeyType, Class<?> expectValueType) throws HessianProtocolException, IOException
HessianProtocolExceptionIOExceptionpublic Object readObject(AbstractHessianInput in, String type, String[] fieldNames) throws HessianProtocolException, IOException
HessianProtocolExceptionIOExceptionpublic Deserializer getObjectDeserializer(String type, Class cl) throws HessianProtocolException
HessianProtocolExceptionpublic Deserializer getObjectDeserializer(String type) throws HessianProtocolException
HessianProtocolExceptionpublic Deserializer getListDeserializer(String type, Class cl) throws HessianProtocolException
HessianProtocolExceptionpublic Deserializer getListDeserializer(String type) throws HessianProtocolException
HessianProtocolExceptionpublic Deserializer getDeserializer(String type) throws HessianProtocolException
HessianProtocolExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.