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
-
Method Summary
Modifier and TypeMethodDescriptionprotected static List
<VendorInformationObject> addVendorInformationObjects
(Queue<Object> objects) static Message
createErrorMsg
(PCEPErrors err, Optional<Rp> optRp) final 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 final void
serializeVendorInformationObjects
(List<VendorInformationObject> viObjects, io.netty.buffer.ByteBuf buffer) protected abstract Message
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 Details
-
AbstractMessageParser
-
-
Method Details
-
serializeObject
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
-
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
-