Class SimpleXROSubobjectRegistry
- java.lang.Object
-
- org.opendaylight.protocol.rsvp.parser.spi.pojo.SimpleXROSubobjectRegistry
-
- All Implemented Interfaces:
XROSubobjectRegistry
public class SimpleXROSubobjectRegistry extends Object implements XROSubobjectRegistry
-
-
Constructor Summary
Constructors Constructor Description SimpleXROSubobjectRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubobjectContainer
parseSubobject(int type, io.netty.buffer.ByteBuf buffer, boolean mandatory)
Finds parser for given subobject type in the registry.org.opendaylight.yangtools.concepts.Registration
registerSubobjectParser(int subobjectType, XROSubobjectParser parser)
org.opendaylight.yangtools.concepts.Registration
registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass, XROSubobjectSerializer serializer)
void
serializeSubobject(SubobjectContainer subobject, io.netty.buffer.ByteBuf buffer)
Find serializer for given subobject.
-
-
-
Method Detail
-
registerSubobjectParser
public org.opendaylight.yangtools.concepts.Registration registerSubobjectParser(int subobjectType, XROSubobjectParser parser)
-
registerSubobjectSerializer
public org.opendaylight.yangtools.concepts.Registration registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass, XROSubobjectSerializer serializer)
-
parseSubobject
public SubobjectContainer parseSubobject(int type, io.netty.buffer.ByteBuf buffer, boolean mandatory) throws RSVPParsingException
Description copied from interface:XROSubobjectRegistry
Finds parser for given subobject type in the registry. Delegates parsing to found parser.- Specified by:
parseSubobject
in interfaceXROSubobjectRegistry
- Parameters:
type
- subobject type, key in parser registrybuffer
- subobject wrapped in ByteBufmandatory
- XRO specific common field- Returns:
- null if the parser for this subobject could not be found
- Throws:
RSVPParsingException
- if the parsing did not succeed
-
serializeSubobject
public void serializeSubobject(SubobjectContainer subobject, io.netty.buffer.ByteBuf buffer)
Description copied from interface:XROSubobjectRegistry
Find serializer for given subobject. Delegates parsing to found serializer.- Specified by:
serializeSubobject
in interfaceXROSubobjectRegistry
- Parameters:
subobject
- to be parsedbuffer
- buffer where the serialized subobject will be parsed
-
-