Class DeserializationFactory


  • public class DeserializationFactory
    extends Object
    Factory for deserialization.
    Author:
    michal.polkorab, timotej.kubas, giuseppex.petralia@intel.com
    • Method Detail

      • deserialize

        public org.opendaylight.yangtools.yang.binding.DataObject deserialize​(io.netty.buffer.ByteBuf rawMessage,
                                                                              org.opendaylight.yangtools.yang.common.Uint8 version)
        Transforms ByteBuf into correct POJO message.
        Parameters:
        rawMessage - the message
        version - 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 key
        clazz - 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