Class SimpleEROSubobjectRegistry

    • Constructor Detail

      • SimpleEROSubobjectRegistry

        public SimpleEROSubobjectRegistry()
    • Method Detail

      • registerSubobjectParser

        public org.opendaylight.yangtools.concepts.Registration registerSubobjectParser​(int subobjectType,
                                                                                        EROSubobjectParser parser)
      • registerSubobjectSerializer

        public org.opendaylight.yangtools.concepts.Registration registerSubobjectSerializer​(Class<? extends SubobjectType> subobjectClass,
                                                                                            EROSubobjectSerializer serializer)
      • parseSubobject

        public Subobject parseSubobject​(int type,
                                        io.netty.buffer.ByteBuf buffer,
                                        boolean loose)
                                 throws PCEPDeserializerException
        Description copied from interface: EROSubobjectRegistry
        Finds parser for given subobject type in the registry. Delegates parsing to found parser.
        Specified by:
        parseSubobject in interface EROSubobjectRegistry
        Parameters:
        type - subobject type, key in parser registry
        buffer - subobject wrapped in ByteBuf
        loose - ERO specific common field
        Returns:
        null if the parser for this subobject could not be found
        Throws:
        PCEPDeserializerException - if the parsing did not succeed
      • serializeSubobject

        public void serializeSubobject​(Subobject subobject,
                                       io.netty.buffer.ByteBuf buffer)
        Description copied from interface: EROSubobjectRegistry
        Find serializer for given subobject. Delegates parsing to found serializer.
        Specified by:
        serializeSubobject in interface EROSubobjectRegistry
        Parameters:
        subobject - to be parsed
        buffer - buffer where the serialized subobject will be parsed