Class SimpleObjectRegistry
java.lang.Object
org.opendaylight.protocol.pcep.spi.pojo.SimpleObjectRegistry
- All Implemented Interfaces:
ObjectRegistry
,VendorInformationObjectRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseObject
(int objectClass, int objectType, ObjectHeader header, io.netty.buffer.ByteBuf buffer) Finds parser for given object type and class in the registry.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 Details
-
SimpleObjectRegistry
-
-
Method Details
-
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
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
-