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 - 
Method Summary
Modifier and TypeMethodDescriptionprotected static List<VendorInformationObject>addVendorInformationObjects(Queue<Object> objects) static MessagecreateErrorMsg(PCEPErrors err, Optional<Rp> optRp) final MessageparseMessage(io.netty.buffer.ByteBuf buffer, List<Message> errors) protected voidserializeObject(@Nullable Object object, io.netty.buffer.ByteBuf buffer) Calls registry to pick up specific object serializer for given object.protected final voidserializeVendorInformationObjects(List<VendorInformationObject> viObjects, io.netty.buffer.ByteBuf buffer) protected abstract MessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
 parseMessagein interfaceMessageParser- Throws:
 PCEPDeserializerException
 - 
serializeVendorInformationObjects
protected final void serializeVendorInformationObjects(List<VendorInformationObject> viObjects, io.netty.buffer.ByteBuf buffer)  - 
addVendorInformationObjects
 
 -