Class SimpleRROSubobjectRegistry
- java.lang.Object
-
- org.opendaylight.protocol.pcep.spi.pojo.SimpleRROSubobjectRegistry
-
- All Implemented Interfaces:
RROSubobjectRegistry
public final class SimpleRROSubobjectRegistry extends Object implements RROSubobjectRegistry
-
-
Constructor Summary
Constructors Constructor Description SimpleRROSubobjectRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subobject
parseSubobject(int type, io.netty.buffer.ByteBuf buffer)
Finds parser for given subobject type in the registry.org.opendaylight.yangtools.concepts.Registration
registerSubobjectParser(int subobjectType, RROSubobjectParser parser)
org.opendaylight.yangtools.concepts.Registration
registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass, RROSubobjectSerializer serializer)
void
serializeSubobject(Subobject subobject, io.netty.buffer.ByteBuf buffer)
Find serializer for given subobject.
-
-
-
Method Detail
-
registerSubobjectParser
public org.opendaylight.yangtools.concepts.Registration registerSubobjectParser(int subobjectType, RROSubobjectParser parser)
-
registerSubobjectSerializer
public org.opendaylight.yangtools.concepts.Registration registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass, RROSubobjectSerializer serializer)
-
parseSubobject
public Subobject parseSubobject(int type, io.netty.buffer.ByteBuf buffer) throws PCEPDeserializerException
Description copied from interface:RROSubobjectRegistry
Finds parser for given subobject type in the registry. Delegates parsing to found parser.- Specified by:
parseSubobject
in interfaceRROSubobjectRegistry
- Parameters:
type
- subobject type, key in parser registrybuffer
- subobject wrapped in ByteBuf- Returns:
- null if the parser for this subobject could not be found otherwise returns parser
- Throws:
PCEPDeserializerException
- if the parsing did not succeed
-
serializeSubobject
public void serializeSubobject(Subobject subobject, io.netty.buffer.ByteBuf buffer)
Description copied from interface:RROSubobjectRegistry
Find serializer for given subobject. Delegates parsing to found serializer.- Specified by:
serializeSubobject
in interfaceRROSubobjectRegistry
- Parameters:
subobject
- to be parsedbuffer
- buffer where the serialized subobject will be parsed
-
-