@Extension(value="hessian2", code=1) public class SofaHessianSerializer extends AbstractSerializer
Encode: Object, SofaRequest and SofaResponse.
Decode by class mode : Support SofaRequest and SofaResponse.
Decode by object template : Support SofaRequest and SofaResponse.
| 限定符和类型 | 字段和说明 |
|---|---|
protected com.caucho.hessian.io.SerializerFactory |
genericSerializerFactory
Generic Serializer Factory
|
protected com.caucho.hessian.io.SerializerFactory |
serializerFactory
Normal Serializer Factory
|
| 构造器和说明 |
|---|
SofaHessianSerializer()
Instantiates a new Sofa hessian serializer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
decode(AbstractByteBuf data,
Class clazz,
Map<String,String> context)
反序列化,只有类型,返回对象
|
void |
decode(AbstractByteBuf data,
Object template,
Map<String,String> context)
反序列化,已有数据,填充字段
|
AbstractByteBuf |
encode(Object object,
Map<String,String> context)
序列化
|
protected com.caucho.hessian.io.SerializerFactory |
getSerializerFactory(boolean multipleClassLoader,
boolean generic)
Gets serializer factory.
|
buildDeserializeError, buildDeserializeError, buildSerializeError, buildSerializeErrorprotected com.caucho.hessian.io.SerializerFactory serializerFactory
protected com.caucho.hessian.io.SerializerFactory genericSerializerFactory
public SofaHessianSerializer()
protected com.caucho.hessian.io.SerializerFactory getSerializerFactory(boolean multipleClassLoader,
boolean generic)
multipleClassLoader - the multiple class loadergeneric - the genericpublic AbstractByteBuf encode(Object object, Map<String,String> context)
Serializerobject - 对象context - 上下文public Object decode(AbstractByteBuf data, Class clazz, Map<String,String> context) throws SofaRpcException
Serializerdata - 原始字节数组clazz - 期望的类型context - 上下文SofaRpcException - 序列化异常public void decode(AbstractByteBuf data, Object template, Map<String,String> context) throws SofaRpcException
Serializerdata - 原始字节数组template - 模板对象context - 上下文SofaRpcException - 序列化异常Copyright © 2008–2018 The Ant Financial. All rights reserved.