Class AbstractInstructionSerializer<T extends Instruction>
java.lang.Object
org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.AbstractInstructionSerializer<T>
- All Implemented Interfaces:
HeaderSerializer<T>
,OFGeneralSerializer
,OFSerializer<T>
- Direct Known Subclasses:
AbstractActionInstructionSerializer
,ClearActionsInstructionSerializer
,GoToTableInstructionSerializer
,MeterInstructionSerializer
,WriteMetadataInstructionSerializer
public abstract class AbstractInstructionSerializer<T extends Instruction>
extends Object
implements OFSerializer<T>, HeaderSerializer<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
Get length.protected abstract int
getType()
Get type.void
Transforms POJO/DTO into byte message (ByteBuf).void
serializeHeader
(T input, io.netty.buffer.ByteBuf outBuffer) Serializes object headers (e.g.
-
Constructor Details
-
AbstractInstructionSerializer
public AbstractInstructionSerializer()
-
-
Method Details
-
serialize
Description copied from interface:OFSerializer
Transforms POJO/DTO into byte message (ByteBuf).- Specified by:
serialize
in interfaceOFSerializer<T extends Instruction>
- Parameters:
input
- object to be serializedoutBuffer
- output buffer
-
serializeHeader
Description copied from interface:HeaderSerializer
Serializes object headers (e.g. for Multipart message - Table Features).- Specified by:
serializeHeader
in interfaceHeaderSerializer<T extends Instruction>
- Parameters:
input
- object whose headers should be serializedoutBuffer
- output buffer
-
getType
protected abstract int getType()Get type.- Returns:
- numeric representation of instruction type.
-
getLength
protected abstract int getLength()Get length.- Returns:
- instruction length.
-