Class SimpleLabelRegistry

    • Constructor Detail

      • SimpleLabelRegistry

        public SimpleLabelRegistry()
    • Method Detail

      • registerLabelParser

        public org.opendaylight.yangtools.concepts.Registration registerLabelParser​(int ctype,
                                                                                    LabelParser parser)
      • registerLabelSerializer

        public org.opendaylight.yangtools.concepts.Registration registerLabelSerializer​(Class<? extends LabelType> labelClass,
                                                                                        LabelSerializer serializer)
      • parseLabel

        public LabelType parseLabel​(int ctype,
                                    io.netty.buffer.ByteBuf buffer)
                             throws PCEPDeserializerException
        Description copied from interface: LabelRegistry
        Finds parser for given label C-type in the registry. Delegates parsing to found parser.
        Specified by:
        parseLabel in interface LabelRegistry
        Parameters:
        ctype - label type, key in parser registry
        buffer - label wrapped in ByteBuf
        Returns:
        null if the parser for this label could not be found
        Throws:
        PCEPDeserializerException - if the parsing did not succeed
      • serializeLabel

        public void serializeLabel​(boolean unidirectional,
                                   boolean global,
                                   LabelType label,
                                   io.netty.buffer.ByteBuf buffer)
        Description copied from interface: LabelRegistry
        Find serializer for given label. Delegates parsing to found serializer.
        Specified by:
        serializeLabel in interface LabelRegistry
        Parameters:
        unidirectional - label common header flag
        global - label commom header flag
        label - to be parsed
        buffer - buffer where the serialized label will be parsed