com.alipay.hessian.generic.io
Class GenericSerializerFactory

java.lang.Object
  extended by com.caucho.hessian.io.AbstractSerializerFactory
      extended by com.caucho.hessian.io.SerializerFactory
          extended by com.alipay.hessian.generic.io.GenericSerializerFactory

public class GenericSerializerFactory
extends com.caucho.hessian.io.SerializerFactory

Since:
5.3.0

Field Summary
 
Fields inherited from class com.caucho.hessian.io.SerializerFactory
_cachedDeserializerMap, _cachedSerializerMap, _cachedTypeDeserializerMap, _collectionSerializer, _defaultSerializer, _factories, _hashMapDeserializer, _isAllowNonSerializable, _staticDeserializerMap, _staticSerializerMap, _staticTypeMap, classNameResolver, OBJECT_DESERIALIZER
 
Constructor Summary
GenericSerializerFactory()
           
 
Method Summary
 void addGenericFactory(AbstractGenericSerializerFactory factory)
          Adds a factory.
protected  com.caucho.hessian.io.Serializer getDefaultSerializer(Class cl)
          重写此方法主要是为了保证类不实现Serializable接口也可序列化
 com.caucho.hessian.io.Deserializer getDeserializer(String type)
          Returns a deserializer based on a string type.
 com.caucho.hessian.io.Serializer getSerializer(Class cl)
          Returns the serializer for a class.
 
Methods inherited from class com.caucho.hessian.io.SerializerFactory
addBasic, addFactory, getClassNameResolver, getDefaultDeserializer, getDeserializer, getObjectDeserializer, getObjectDeserializer, isAllowNonSerializable, readList, readMap, readObject, setAllowNonSerializable, setClassNameResolver, setSendCollectionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSerializerFactory

public GenericSerializerFactory()
Method Detail

addGenericFactory

public void addGenericFactory(AbstractGenericSerializerFactory factory)
Adds a factory.


getSerializer

public com.caucho.hessian.io.Serializer getSerializer(Class cl)
                                               throws com.caucho.hessian.io.HessianProtocolException
Description copied from class: com.caucho.hessian.io.SerializerFactory
Returns the serializer for a class.

Overrides:
getSerializer in class com.caucho.hessian.io.SerializerFactory
Parameters:
cl - the class of the object that needs to be serialized.
Returns:
a serializer object for the serialization.
Throws:
com.caucho.hessian.io.HessianProtocolException

getDefaultSerializer

protected com.caucho.hessian.io.Serializer getDefaultSerializer(Class cl)
重写此方法主要是为了保证类不实现Serializable接口也可序列化

Overrides:
getDefaultSerializer in class com.caucho.hessian.io.SerializerFactory
Parameters:
cl - Class
Returns:
Serializer

getDeserializer

public com.caucho.hessian.io.Deserializer getDeserializer(String type)
                                                   throws com.caucho.hessian.io.HessianProtocolException
Description copied from class: com.caucho.hessian.io.SerializerFactory
Returns a deserializer based on a string type.

Overrides:
getDeserializer in class com.caucho.hessian.io.SerializerFactory
Throws:
com.caucho.hessian.io.HessianProtocolException


Copyright © 2008–2018 Ant Financial. All rights reserved.