public class Serializer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GSON |
static java.lang.String |
JAVA |
static java.lang.String |
KRYO |
ISerializer |
serializer |
Constructor and Description |
---|
Serializer(java.util.Properties env) |
Modifier and Type | Method and Description |
---|---|
Request |
deserializeRequest(java.lang.String type,
byte[] bytes,
RemoteObject obj) |
Response |
deserializeResponse(byte[] bytes,
java.lang.Class<?> type) |
ISerializer |
getInstance() |
ISerializer |
getInstance(java.lang.String type) |
byte[] |
serialize(java.lang.Object obj) |
byte[] |
serialize(java.lang.String type,
java.lang.Object obj) |
public static final java.lang.String KRYO
public static final java.lang.String JAVA
public static final java.lang.String GSON
public ISerializer serializer
public ISerializer getInstance() throws SerializerException
SerializerException
public ISerializer getInstance(java.lang.String type) throws SerializerException
SerializerException
public byte[] serialize(java.lang.String type, java.lang.Object obj) throws SerializerException
SerializerException
public byte[] serialize(java.lang.Object obj) throws SerializerException
SerializerException
public Request deserializeRequest(java.lang.String type, byte[] bytes, RemoteObject obj) throws SerializerException
SerializerException
public Response deserializeResponse(byte[] bytes, java.lang.Class<?> type) throws SerializerException
SerializerException