com.alibaba.rocketmq.remoting.protocol
类 RemotingSerializable

java.lang.Object
  继承者 com.alibaba.rocketmq.remoting.protocol.RemotingSerializable

public abstract class RemotingSerializable
extends Object

复杂对象的序列化,利用json来实现

从以下版本开始:
2013-7-13
作者:
shijia.wxr

构造方法摘要
RemotingSerializable()
           
 
方法摘要
static
<T> T
decode(byte[] data, Class<T> classOfT)
           
 byte[] encode()
           
static byte[] encode(Object obj)
           
static
<T> T
fromJson(String json, Class<T> classOfT)
           
 String toJson()
           
 String toJson(boolean prettyFormat)
           
static String toJson(Object obj, boolean prettyFormat)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

RemotingSerializable

public RemotingSerializable()
方法详细信息

toJson

public String toJson()

toJson

public String toJson(boolean prettyFormat)

toJson

public static String toJson(Object obj,
                            boolean prettyFormat)

fromJson

public static <T> T fromJson(String json,
                             Class<T> classOfT)

encode

public byte[] encode()

encode

public static byte[] encode(Object obj)

decode

public static <T> T decode(byte[] data,
                           Class<T> classOfT)


Copyright © 2012-2015. All Rights Reserved.