public class SerializerFactory extends AbstractSerializerFactory
| 构造器和说明 |
|---|
SerializerFactory() |
SerializerFactory(ClassLoader loader) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 AbstractSerializerFactorycl - the class of the object that needs to be serialized.HessianProtocolExceptionpublic Deserializer getDeserializer(Class cl) throws HessianProtocolException
getDeserializer 在类中 AbstractSerializerFactorycl - the class of the object that needs to be deserialized.HessianProtocolExceptionpublic Object readList(AbstractHessianInput in, int length, String type) throws HessianProtocolException, IOException
public Object readMap(AbstractHessianInput in, String type) throws HessianProtocolException, IOException
public Object readMap(AbstractHessianInput in, String type, Class<?> expectKeyType, Class<?> expectValueType) throws HessianProtocolException, IOException
public Object readObject(AbstractHessianInput in, String type, String[] fieldNames) throws HessianProtocolException, IOException
public Deserializer getObjectDeserializer(String type, Class cl) throws HessianProtocolException
public Deserializer getObjectDeserializer(String type) throws HessianProtocolException
public Deserializer getListDeserializer(String type, Class cl) throws HessianProtocolException
public Deserializer getListDeserializer(String type) throws HessianProtocolException
public Deserializer getDeserializer(String type) throws HessianProtocolException
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.