Class DeserializerRegistryImpl
java.lang.Object
org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl
- All Implemented Interfaces:
DeserializerRegistry
Stores and registers deserializers.
- Author:
- michal.polkorab
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends OFGeneralDeserializer>
TGets the deserializer for the given key.void
init()
Decoder table provisioning.void
registerDeserializer
(MessageCodeKey key, OFGeneralDeserializer deserializer) Registers a deserializer.boolean
Unregisters a deserializer.
-
Constructor Details
-
DeserializerRegistryImpl
public DeserializerRegistryImpl()
-
-
Method Details
-
init
public void init()Decoder table provisioning.- Specified by:
init
in interfaceDeserializerRegistry
-
getDeserializer
Description copied from interface:DeserializerRegistry
Gets the deserializer for the given key.- Specified by:
getDeserializer
in interfaceDeserializerRegistry
- Type Parameters:
T
- type of particular deserializer- Parameters:
key
- used for deserializer lookup- Returns:
- deserializer found
-
registerDeserializer
Description copied from interface:DeserializerRegistry
Registers a deserializer. Throws IllegalStateException when there is a deserializer already registered under given key.If the deserializer implements
DeserializerRegistryInjector
interface, the deserializer is injected with DeserializerRegistry instance.- Specified by:
registerDeserializer
in interfaceDeserializerRegistry
- Parameters:
key
- used for deserializer lookupdeserializer
- deserializer instance
-
unregisterDeserializer
Description copied from interface:DeserializerRegistry
Unregisters a deserializer.- Specified by:
unregisterDeserializer
in interfaceDeserializerRegistry
- Parameters:
key
- used for deserializer lookup- Returns:
- true if deserializer was removed, false if no deserializer was found under specified key
-