Class MatchSerializer
- java.lang.Object
-
- org.opendaylight.openflowplugin.impl.protocol.serialization.match.MatchSerializer
-
- All Implemented Interfaces:
HeaderSerializer<Match>
,OFGeneralSerializer
,OFSerializer<Match>
,SerializerRegistryInjector
,MatchEntrySerializerRegistry
public class MatchSerializer extends Object implements OFSerializer<Match>, HeaderSerializer<Match>, MatchEntrySerializerRegistry, SerializerRegistryInjector
-
-
Constructor Summary
Constructors Constructor Description MatchSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
injectSerializerRegistry(SerializerRegistry serializerRegistry)
Injects serializer registry.void
registerEntrySerializer(MatchEntrySerializerKey key, MatchEntrySerializer serializer)
Registers match entry serializer.void
serialize(Match match, io.netty.buffer.ByteBuf outBuffer)
Transforms POJO/DTO into byte message (ByteBuf).void
serializeHeader(Match match, io.netty.buffer.ByteBuf outBuffer)
Serializes object headers (e.g.boolean
unregisterEntrySerializer(MatchEntrySerializerKey key)
Unregisters match entry serializer.
-
-
-
Method Detail
-
serialize
public void serialize(Match match, io.netty.buffer.ByteBuf outBuffer)
Description copied from interface:OFSerializer
Transforms POJO/DTO into byte message (ByteBuf).- Specified by:
serialize
in interfaceOFSerializer<Match>
- Parameters:
match
- object to be serializedoutBuffer
- output buffer
-
serializeHeader
public void serializeHeader(Match match, 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<Match>
- Parameters:
match
- object whose headers should be serializedoutBuffer
- output buffer
-
injectSerializerRegistry
public void injectSerializerRegistry(SerializerRegistry serializerRegistry)
Description copied from interface:SerializerRegistryInjector
Injects serializer registry.- Specified by:
injectSerializerRegistry
in interfaceSerializerRegistryInjector
- Parameters:
serializerRegistry
- registry instance
-
registerEntrySerializer
public void registerEntrySerializer(MatchEntrySerializerKey key, MatchEntrySerializer serializer)
Description copied from interface:MatchEntrySerializerRegistry
Registers match entry serializer.- Specified by:
registerEntrySerializer
in interfaceMatchEntrySerializerRegistry
- Parameters:
key
- used for deserializer lookupserializer
- serializer instance
-
unregisterEntrySerializer
public boolean unregisterEntrySerializer(MatchEntrySerializerKey key)
Description copied from interface:MatchEntrySerializerRegistry
Unregisters match entry serializer.- Specified by:
unregisterEntrySerializer
in interfaceMatchEntrySerializerRegistry
- Parameters:
key
- used for serializer lookup- Returns:
- true if serializer was removed, false if no serializer was found under specified key
-
-