Class AbstractMessageParser
- java.lang.Object
-
- org.opendaylight.protocol.pcep.spi.AbstractMessageParser
-
- All Implemented Interfaces:
MessageParser
,MessageSerializer
- Direct Known Subclasses:
InitiatedPCInitiateMessageParser
,PCEPCloseMessageParser
,PCEPErrorMessageParser
,PCEPKeepAliveMessageParser
,PCEPMonitoringReplyMessageParser
,PCEPNotificationMessageParser
,PCEPOpenMessageParser
,PCEPReplyMessageParser
,PCEPRequestMessageParser
,PCEPStartTLSMessageParser
,StatefulPCReportMessageParser
,StatefulPCUpdateRequestMessageParser
public abstract class AbstractMessageParser extends Object implements MessageParser, MessageSerializer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMessageParser(ObjectRegistry registry)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static List<VendorInformationObject>
addVendorInformationObjects(Queue<Object> objects)
static Message
createErrorMsg(PCEPErrors err, Optional<Rp> optRp)
Message
parseMessage(io.netty.buffer.ByteBuf buffer, List<Message> errors)
protected void
serializeObject(@Nullable Object object, io.netty.buffer.ByteBuf buffer)
Calls registry to pick up specific object serializer for given object.protected void
serializeVendorInformationObjects(List<VendorInformationObject> viObjects, io.netty.buffer.ByteBuf buffer)
protected abstract Message
validate(Queue<Object> objects, List<Message> errors)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.protocol.pcep.spi.MessageSerializer
serializeMessage
-
-
-
-
Constructor Detail
-
AbstractMessageParser
protected AbstractMessageParser(ObjectRegistry registry)
-
-
Method Detail
-
serializeObject
protected void serializeObject(@Nullable Object object, io.netty.buffer.ByteBuf buffer)
Calls registry to pick up specific object serializer for given object. Checks if the object is not null.- Parameters:
object
- Object to be serialized, may be nullbuffer
- ByteBuf where the object should be serialized
-
createErrorMsg
public static Message createErrorMsg(PCEPErrors err, Optional<Rp> optRp)
-
validate
protected abstract Message validate(Queue<Object> objects, List<Message> errors) throws PCEPDeserializerException
- Throws:
PCEPDeserializerException
-
parseMessage
public final Message parseMessage(io.netty.buffer.ByteBuf buffer, List<Message> errors) throws PCEPDeserializerException
- Specified by:
parseMessage
in interfaceMessageParser
- Throws:
PCEPDeserializerException
-
serializeVendorInformationObjects
protected final void serializeVendorInformationObjects(List<VendorInformationObject> viObjects, io.netty.buffer.ByteBuf buffer)
-
addVendorInformationObjects
protected static List<VendorInformationObject> addVendorInformationObjects(Queue<Object> objects)
-
-