Class AbstractMessageSerializer<T extends OfHeader>

java.lang.Object
org.opendaylight.openflowplugin.impl.protocol.serialization.messages.AbstractMessageSerializer<T>
All Implemented Interfaces:
HeaderSerializer<T>, OFGeneralSerializer, OFSerializer<T>
Direct Known Subclasses:
AsyncConfigMessageSerializer, FlowMessageSerializer, GroupMessageSerializer, MeterMessageSerializer, MultipartRequestMessageSerializer, PortMessageSerializer

public abstract class AbstractMessageSerializer<T extends OfHeader> extends Object implements OFSerializer<T>, HeaderSerializer<T>
  • Constructor Details

    • AbstractMessageSerializer

      public AbstractMessageSerializer()
  • Method Details

    • serialize

      public void serialize(T message, io.netty.buffer.ByteBuf outBuffer)
      Description copied from interface: OFSerializer
      Transforms POJO/DTO into byte message (ByteBuf).
      Specified by:
      serialize in interface OFSerializer<T extends OfHeader>
      Parameters:
      message - object to be serialized
      outBuffer - output buffer
    • serializeHeader

      public void serializeHeader(T message, io.netty.buffer.ByteBuf outBuffer)
      Description copied from interface: HeaderSerializer
      Serializes object headers (e.g. for Multipart message - Table Features).
      Specified by:
      serializeHeader in interface HeaderSerializer<T extends OfHeader>
      Parameters:
      message - object whose headers should be serialized
      outBuffer - output buffer
    • getMessageType

      protected abstract byte getMessageType()
      Message type getter.
      Returns:
      of message type