Class SimpleLabelRegistry
java.lang.Object
org.opendaylight.protocol.rsvp.parser.spi.pojo.SimpleLabelRegistry
- All Implemented Interfaces:
LabelRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseLabel
(int ctype, io.netty.buffer.ByteBuf buffer) Finds parser for given label C-type in the registry.org.opendaylight.yangtools.concepts.Registration
registerLabelParser
(int ctype, LabelParser parser) org.opendaylight.yangtools.concepts.Registration
registerLabelSerializer
(Class<? extends LabelType> labelClass, LabelSerializer serializer) void
serializeLabel
(boolean unidirectional, boolean global, LabelType label, io.netty.buffer.ByteBuf buffer) Find serializer for given label.
-
Constructor Details
-
SimpleLabelRegistry
public SimpleLabelRegistry()
-
-
Method Details
-
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
Description copied from interface:LabelRegistry
Finds parser for given label C-type in the registry. Delegates parsing to found parser.- Specified by:
parseLabel
in interfaceLabelRegistry
- Parameters:
ctype
- label type, key in parser registrybuffer
- label wrapped in ByteBuf- Returns:
- null if the parser for this label could not be found
- Throws:
RSVPParsingException
- 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 interfaceLabelRegistry
- Parameters:
unidirectional
- label common header flagglobal
- label commom header flaglabel
- to be parsedbuffer
- buffer where the serialized label will be parsed
-