Class SimpleObjectRegistry
- java.lang.Object
-
- org.opendaylight.protocol.pcep.spi.pojo.SimpleObjectRegistry
-
- All Implemented Interfaces:
ObjectRegistry
,VendorInformationObjectRegistry
public final class SimpleObjectRegistry extends Object implements ObjectRegistry
-
-
Constructor Summary
Constructors Constructor Description SimpleObjectRegistry(VendorInformationObjectRegistry viRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
parseObject(int objectClass, int objectType, ObjectHeader header, io.netty.buffer.ByteBuf buffer)
Finds parser for given object type and class in the registry.Optional<? extends Object>
parseVendorInformationObject(EnterpriseNumber enterpriseNumber, ObjectHeader header, io.netty.buffer.ByteBuf buffer)
org.opendaylight.yangtools.concepts.Registration
registerObjectParser(int objectClass, int objectType, ObjectParser parser)
org.opendaylight.yangtools.concepts.Registration
registerObjectSerializer(Class<? extends Object> objClass, ObjectSerializer serializer)
void
serializeObject(Object object, io.netty.buffer.ByteBuf buffer)
Find serializer for given object.void
serializeVendorInformationObject(VendorInformationObject viObject, io.netty.buffer.ByteBuf buffer)
-
-
-
Constructor Detail
-
SimpleObjectRegistry
public SimpleObjectRegistry(VendorInformationObjectRegistry viRegistry)
-
-
Method Detail
-
registerObjectParser
public org.opendaylight.yangtools.concepts.Registration registerObjectParser(int objectClass, int objectType, ObjectParser parser)
-
registerObjectSerializer
public org.opendaylight.yangtools.concepts.Registration registerObjectSerializer(Class<? extends Object> objClass, ObjectSerializer serializer)
-
parseObject
public Object parseObject(int objectClass, int objectType, ObjectHeader header, io.netty.buffer.ByteBuf buffer) throws PCEPDeserializerException
Description copied from interface:ObjectRegistry
Finds parser for given object type and class in the registry. Delegates parsing to found parser.- Specified by:
parseObject
in interfaceObjectRegistry
- Parameters:
objectClass
- object classobjectType
- object typeheader
- ObjectHeaderbuffer
- object wrapped in ByteBuf- Returns:
- null if the parser for this object could not be found
- Throws:
PCEPDeserializerException
- if the parsing did not succeed
-
serializeObject
public void serializeObject(Object object, io.netty.buffer.ByteBuf buffer)
Description copied from interface:ObjectRegistry
Find serializer for given object. Delegates parsing to found serializer.- Specified by:
serializeObject
in interfaceObjectRegistry
- Parameters:
object
- to be parsedbuffer
- ByteBuf wrapped around bytes representing given object
-
parseVendorInformationObject
public Optional<? extends Object> parseVendorInformationObject(EnterpriseNumber enterpriseNumber, ObjectHeader header, io.netty.buffer.ByteBuf buffer) throws PCEPDeserializerException
- Specified by:
parseVendorInformationObject
in interfaceVendorInformationObjectRegistry
- Throws:
PCEPDeserializerException
-
serializeVendorInformationObject
public void serializeVendorInformationObject(VendorInformationObject viObject, io.netty.buffer.ByteBuf buffer)
- Specified by:
serializeVendorInformationObject
in interfaceVendorInformationObjectRegistry
-
-