类 SerializerFactory
-
- com.alibaba.com.caucho.hessian.io.AbstractSerializerFactory
-
- com.alibaba.com.caucho.hessian.io.SerializerFactory
-
public class SerializerFactory extends AbstractSerializerFactory
Factory for returning serialization methods.
-
-
构造器概要
构造器 构造器 说明 SerializerFactory()
loader)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addFactory(AbstractSerializerFactory factory)
Adds a factory.ClassFactory
getClassFactory()
getClassLoader()
Deserializer
cl)
Returns the deserializer for a class.Deserializer
type)
Returns a deserializer based on a string type.Deserializer
type)
Reads the object as a map.Deserializer
type, cl)
Reads the object as a map.Deserializer
type)
Reads the object as a map.Deserializer
type, cl)
Reads the object as a map.Serializer
cl)
Returns the serializer for a class.boolean
isAllowNonSerializable()
If true, non-serializable objects are allowed.<?>
className)
readList(AbstractHessianInput in, int length, type)
Reads the object as a list.readMap(AbstractHessianInput in, type)
Reads the object as a map.readMap(AbstractHessianInput in, type, <?> expectKeyType, <?> expectValueType)
Reads the object as a map.readObject(AbstractHessianInput in, type, [] 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.
-
-
-
方法详细资料
-
loadSerializedClass
public <?> loadSerializedClass( className) throws
- 抛出:
-
getClassFactory
public ClassFactory getClassFactory()
-
getClassLoader
public getClassLoader()
-
setSendCollectionType
public void setSendCollectionType(boolean isSendType)
Set true if the collection serializer should send the java type.
-
addFactory
public void addFactory(AbstractSerializerFactory factory)
Adds a factory.
-
isAllowNonSerializable
public boolean isAllowNonSerializable()
If true, non-serializable objects are allowed.
-
setAllowNonSerializable
public void setAllowNonSerializable(boolean allow)
If true, non-serializable objects are allowed.
-
getSerializer
public cl) throws HessianProtocolException
Returns the serializer for a class.- 指定者:
getSerializer
在类中AbstractSerializerFactory
- 参数:
cl
- the class of the object that needs to be serialized.- 返回:
- a serializer object for the serialization.
- 抛出:
HessianProtocolException
-
getDeserializer
public cl) throws HessianProtocolException
Returns the deserializer for a class.- 指定者:
getDeserializer
在类中AbstractSerializerFactory
- 参数:
cl
- the class of the object that needs to be deserialized.- 返回:
- a deserializer object for the serialization.
- 抛出:
HessianProtocolException
-
readList
public readList(AbstractHessianInput in, int length, type) throws HessianProtocolException,
Reads the object as a list.
-
readMap
public readMap(AbstractHessianInput in, type) throws HessianProtocolException,
Reads the object as a map.
-
readMap
public readMap(AbstractHessianInput in, type, <?> expectKeyType, <?> expectValueType) throws HessianProtocolException,
Reads the object as a map.
-
readObject
public readObject(AbstractHessianInput in, type, [] fieldNames) throws HessianProtocolException,
Reads the object as a map.
-
getObjectDeserializer
public type, cl) throws HessianProtocolException
Reads the object as a map.
-
getObjectDeserializer
public type) throws HessianProtocolException
Reads the object as a map.
-
getListDeserializer
public type, cl) throws HessianProtocolException
Reads the object as a map.
-
getListDeserializer
public type) throws HessianProtocolException
Reads the object as a map.
-
getDeserializer
public type) throws HessianProtocolException
Returns a deserializer based on a string type.
-
-