public class GsonImp extends java.lang.Object implements ISerializer
Constructor and Description |
---|
GsonImp() |
Modifier and Type | Method and Description |
---|---|
Request |
deserializeRequest(byte[] bytes,
RemoteObject obj)
Deserialize a Request
|
Response |
deserializeResponse(byte[] bytes,
java.lang.Class<?> type)
Deserialize a Response
|
byte[] |
serialize(java.lang.Object obj)
Serialize
|
public byte[] serialize(java.lang.Object obj) throws SerializerException
ISerializer
serialize
in interface ISerializer
obj
- - object to serializeSerializerException
- - If the serialization failedpublic Request deserializeRequest(byte[] bytes, RemoteObject obj) throws SerializerException
ISerializer
deserializeRequest
in interface ISerializer
bytes
- - serialized requestobj
- - remoteObject which is receiving requestsSerializerException
- - If the serialization failedpublic Response deserializeResponse(byte[] bytes, java.lang.Class<?> type) throws SerializerException
ISerializer
deserializeResponse
in interface ISerializer
bytes
- serialized responsetype
- - return type expectedSerializerException
- - If the serialization failed