public class RpcCustomSerializer extends java.lang.Object implements ISerializer
Constructor and Description |
---|
RpcCustomSerializer(ISerializer serializer)
Constructs the serializer.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
deserialize(java.lang.Object serializedData,
java.lang.Class<T> clazz)
Deserializes data.
|
<T> java.lang.Object |
serialize(T dataToSerialize,
java.lang.Class<T> clazz)
Serializes data.
|
public RpcCustomSerializer(ISerializer serializer)
serializer
- Underlying serializer used to serialize/deserialize method's input parameters.public <T> java.lang.Object serialize(T dataToSerialize, java.lang.Class<T> clazz) throws java.lang.Exception
serialize
in interface ISerializer
dataToSerialize
- Data to be serialized.clazz
- represents the serialized type.java.lang.Exception
- If the serialization fails.public <T> T deserialize(java.lang.Object serializedData, java.lang.Class<T> clazz) throws java.lang.Exception
ISerializer
deserialize
in interface ISerializer
serializedData
- Data to be deserialized.java.lang.Exception
- If the deserialization fails.