omq.common.util.Serializers

## Interface ISerializer

- All Known Implementing Classes:
    GsonImp, JavaImp, KryoImp

      public interface ISerializer

  An ISerializer object can serialize any kind of objects and deserialize Requests and Responses.
  Author:
    Sergi Toda

- - ### Method Summary

    Methods
    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

- - ### Method Detail

    - #### serialize

          byte[] serialize(java.lang.Object obj)
                           throws SerializerException

      Serialize
      Parameters:
        `obj` - - object to serialize
      Returns:
        objectSerialized
      Throws:
        `SerializerException` - - If the serialization failed

    - #### deserializeRequest

          Request deserializeRequest(byte[] bytes,
                                   RemoteObject obj)
                                     throws SerializerException

      Deserialize a Request
      Parameters:
        `bytes` - - serialized request
        `obj` - - remoteObject which is receiving requests
      Returns:
        request
      Throws:
        `SerializerException` - - If the serialization failed

    - #### deserializeResponse

          Response deserializeResponse(byte[] bytes,
                                     java.lang.Class<?> type)
                                       throws SerializerException

      Deserialize a Response
      Parameters:
        `bytes` - serialized response
        `type` - - return type expected
      Returns:
        response
      Throws:
        `SerializerException` - - If the serialization failed