Class AckosMessageSerializer<T>

java.lang.Object
pt.unl.fct.di.novasys.channel.ackos.messaging.AckosMessageSerializer<T>
All Implemented Interfaces:
ISerializer<AckosMessage<T>>

public class AckosMessageSerializer<T> extends Object implements ISerializer<AckosMessage<T>>
  • Constructor Details

    • AckosMessageSerializer

      public AckosMessageSerializer(ISerializer<T> innerSerializer)
  • Method Details

    • serialize

      public void serialize(AckosMessage<T> ackosMessage, io.netty.buffer.ByteBuf out) throws IOException
      Description copied from interface: ISerializer
      Serializes the received object into the received byte buffer.
      Specified by:
      serialize in interface ISerializer<T>
      Parameters:
      ackosMessage - The object to serialize
      out - The byte buffer to which the object will the written
      Throws:
      IOException - if the serialization fails
    • deserialize

      public AckosMessage<T> deserialize(io.netty.buffer.ByteBuf in) throws IOException
      Description copied from interface: ISerializer
      Deserializes an object from a byte buffer and returns it.
      Specified by:
      deserialize in interface ISerializer<T>
      Parameters:
      in - The byte buffer which contains the object to be deserialized
      Returns:
      The deserialized object
      Throws:
      IOException - if the deserialization fails