public class SerializerRegistryImpl extends Object implements SerializerRegistry
Constructor and Description |
---|
SerializerRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
<K,S extends OFGeneralSerializer> |
getSerializer(MessageTypeKey<K> msgTypeKey)
Gets the encoder for the given message type key.
|
void |
init()
Serializer registry provisioning.
|
boolean |
isGroupAddModEnabled()
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.
|
public void init()
SerializerRegistry
init
in interface SerializerRegistry
public void setGroupAddModConfig(boolean value)
SerializerRegistry
setGroupAddModConfig
in interface SerializerRegistry
value
- true if group add mod messages are enabledpublic boolean isGroupAddModEnabled()
SerializerRegistry
isGroupAddModEnabled
in interface SerializerRegistry
public <K,S extends OFGeneralSerializer> S getSerializer(MessageTypeKey<K> msgTypeKey)
getSerializer
in interface SerializerRegistry
K
- input key typeS
- type of resulting serializermsgTypeKey
- the message type keypublic <K> void registerSerializer(MessageTypeKey<K> msgTypeKey, OFGeneralSerializer serializer)
SerializerRegistry
Throws IllegalStateException when there is a serializer already registered under given key.
If the serializer implements SerializerRegistryInjector
interface,
the serializer is injected with SerializerRegistry instance.
registerSerializer
in interface SerializerRegistry
K
- serializer key typemsgTypeKey
- used for serializer lookupserializer
- serializer implementationpublic <K> boolean unregisterSerializer(MessageTypeKey<K> msgTypeKey)
SerializerRegistry
unregisterSerializer
in interface SerializerRegistry
K
- serializer key typemsgTypeKey
- used for serializer lookupCopyright © 2020 OpenDaylight. All rights reserved.