omq.common.util.Serializers

## Class KryoImp

- java.lang.Object
- - omq.common.util.Serializers.KryoImp

- All Implemented Interfaces:
    ISerializer

      public class KryoImp
      extends java.lang.Object
      implements ISerializer

  Kryo serializerimplementation. It uses the Kryo libraries.
  Author:
    Sergi Toda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KryoImp()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `deserializeObject(byte[] bytes, java.lang.Class<?> type)`
    `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

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KryoImp

          public KryoImp()

  - ### Method Detail

    - #### serialize

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

      Description copied from interface: `ISerializer`
      Serialize
      Specified by:
        `serialize` in interface `ISerializer`
      Parameters:
        `obj` - - object to serialize
      Returns:
        objectSerialized
      Throws:
        `SerializerException` - - If the serialization failed

    - #### deserializeRequest

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

      Description copied from interface: `ISerializer`
      Deserialize a Request
      Specified by:
        `deserializeRequest` in interface `ISerializer`
      Parameters:
        `bytes` - - serialized request
        `obj` - - remoteObject which is receiving requests
      Returns:
        request
      Throws:
        `SerializerException` - - If the serialization failed

    - #### deserializeResponse

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

      Description copied from interface: `ISerializer`
      Deserialize a Response
      Specified by:
        `deserializeResponse` in interface `ISerializer`
      Parameters:
        `bytes` - serialized response
        `type` - - return type expected
      Returns:
        response
      Throws:
        `SerializerException` - - If the serialization failed

    - #### deserializeObject

          public java.lang.Object deserializeObject(byte[] bytes,
                                           java.lang.Class<?> type)
                                             throws SerializerException

      Throws:
        `SerializerException`