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 Summary
Constructors Constructor Description AbstractMessageSerializer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract byte
getMessageType()
Message type getter.void
serialize(T message, io.netty.buffer.ByteBuf outBuffer)
Transforms POJO/DTO into byte message (ByteBuf).void
serializeHeader(T message, io.netty.buffer.ByteBuf outBuffer)
Serializes object headers (e.g.
-
-
-
Method Detail
-
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 interfaceOFSerializer<T extends OfHeader>
- Parameters:
message
- object to be serializedoutBuffer
- 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 interfaceHeaderSerializer<T extends OfHeader>
- Parameters:
message
- object whose headers should be serializedoutBuffer
- output buffer
-
getMessageType
protected abstract byte getMessageType()
Message type getter.- Returns:
- of message type
-
-