Class SerializerRegistryImpl
java.lang.Object
org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl
- All Implemented Interfaces:
SerializerRegistry
- Author:
- michal.polkorab, timotej.kubas, giuseppex.petralia@intel.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<K,
S extends OFGeneralSerializer>
SgetSerializer
(MessageTypeKey<K> msgTypeKey) Gets the encoder for the given message type key.void
init()
Serializer registry provisioning.boolean
Checks if group add mod messages are enabled.<K> void
registerSerializer
(MessageTypeKey<K> msgTypeKey, OFGeneralSerializer serializer) Registers a serializer.void
setGroupAddModConfig
(boolean value) Sets whether or not group add mod messages are enabled.<K> boolean
unregisterSerializer
(MessageTypeKey<K> msgTypeKey) Unregisters a serializer.
-
Constructor Details
-
SerializerRegistryImpl
public SerializerRegistryImpl()
-
-
Method Details
-
init
public void init()Description copied from interface:SerializerRegistry
Serializer registry provisioning.- Specified by:
init
in interfaceSerializerRegistry
-
setGroupAddModConfig
public void setGroupAddModConfig(boolean value) Description copied from interface:SerializerRegistry
Sets whether or not group add mod messages are enabled.- Specified by:
setGroupAddModConfig
in interfaceSerializerRegistry
- Parameters:
value
- true if group add mod messages are enabled
-
isGroupAddModEnabled
public boolean isGroupAddModEnabled()Description copied from interface:SerializerRegistry
Checks if group add mod messages are enabled.- Specified by:
isGroupAddModEnabled
in interfaceSerializerRegistry
- Returns:
- true if group add mod messages are enabled
-
getSerializer
Gets the encoder for the given message type key.- Specified by:
getSerializer
in interfaceSerializerRegistry
- Type Parameters:
K
- input key typeS
- type of resulting serializer- Parameters:
msgTypeKey
- the message type key- Returns:
- encoder for current type of message (msgTypeKey)
-
registerSerializer
Description copied from interface:SerializerRegistry
Registers a serializer.If the serializer implements
SerializerRegistryInjector
interface, the serializer is injected with SerializerRegistry instance.- Specified by:
registerSerializer
in interfaceSerializerRegistry
- Type Parameters:
K
- serializer key type- Parameters:
msgTypeKey
- used for serializer lookupserializer
- serializer implementation
-
unregisterSerializer
Description copied from interface:SerializerRegistry
Unregisters a serializer.- Specified by:
unregisterSerializer
in interfaceSerializerRegistry
- Type Parameters:
K
- serializer key type- Parameters:
msgTypeKey
- used for serializer lookup- Returns:
- true if serializer was removed, false if no serializer was found under specified key
-