Class DeserializationFactory
- java.lang.Object
-
- org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializationFactory
-
public class DeserializationFactory extends Object
Factory for deserialization.- Author:
- michal.polkorab, timotej.kubas, giuseppex.petralia@intel.com
-
-
Constructor Summary
Constructors Constructor Description DeserializationFactory(DeserializerRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opendaylight.yangtools.yang.binding.DataObject
deserialize(io.netty.buffer.ByteBuf rawMessage, short version)
Transforms ByteBuf into correct POJO message.void
registerMapping(TypeToClassKey key, Class<?> clazz)
Register new type to class mapping used to assign return type when deserializing message.boolean
unregisterMapping(TypeToClassKey key)
Unregister type to class mapping used to assign return type when deserializing message.
-
-
-
Constructor Detail
-
DeserializationFactory
public DeserializationFactory(DeserializerRegistry registry)
-
-
Method Detail
-
deserialize
public org.opendaylight.yangtools.yang.binding.DataObject deserialize(io.netty.buffer.ByteBuf rawMessage, short version)
Transforms ByteBuf into correct POJO message.- Parameters:
rawMessage
- the messageversion
- version decoded from OpenFlow protocol message- Returns:
- correct POJO as DataObject
-
registerMapping
public void registerMapping(TypeToClassKey key, Class<?> clazz)
Register new type to class mapping used to assign return type when deserializing message.- Parameters:
key
- type to class keyclazz
- return class
-
unregisterMapping
public boolean unregisterMapping(TypeToClassKey key)
Unregister type to class mapping used to assign return type when deserializing message.- Parameters:
key
- type to class key- Returns:
- true if mapping was successfully removed
-
-