eneter.messaging.dataprocessing.serializing
Interface ISerializer

All Known Implementing Classes:
AesSerializer, GZipSerializer, JavaBinarySerializer, RpcCustomSerializer, RsaDigitalSignatureSerializer, RsaSerializer, XmlStringSerializer

public interface ISerializer

Declares the serializer.


Method Summary
<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.
 

Method Detail

serialize

<T> java.lang.Object serialize(T dataToSerialize,
                               java.lang.Class<T> clazz)
                           throws java.lang.Exception
Serializes data.

Parameters:
dataToSerialize - Data to be serialized.
clazz - represents the serialized type.
Returns:
Object representing the serialized data. Based on the serializer implementation it can be byte[] or String.
Throws:
java.lang.Exception - If the serialization fails.

deserialize

<T> T deserialize(java.lang.Object serializedData,
                  java.lang.Class<T> clazz)
              throws java.lang.Exception
Deserializes data.

Parameters:
serializedData - Data to be deserialized.
Returns:
Deserialized object.
Throws:
java.lang.Exception - If the deserialization fails.