Class BGPOpenMessageParser
java.lang.Object
org.opendaylight.protocol.bgp.parser.impl.message.BGPOpenMessageParser
- All Implemented Interfaces:
MessageParser,MessageSerializer
Parser for BGP Open message.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseMessageBody(io.netty.buffer.ByteBuf body, int messageLength, PeerSpecificParserConstraint constraint) Parses given byte array to BGP Open message.voidserializeMessage(org.opendaylight.yangtools.yang.binding.Notification<?> msg, io.netty.buffer.ByteBuf bytes) Serializes given BGP Open message to byte array, without the header.
-
Field Details
-
TYPE
public static final int TYPE- See Also:
-
AS_TRANS
public static final int AS_TRANS- See Also:
-
-
Constructor Details
-
BGPOpenMessageParser
-
-
Method Details
-
serializeMessage
public void serializeMessage(org.opendaylight.yangtools.yang.binding.Notification<?> msg, io.netty.buffer.ByteBuf bytes) Serializes given BGP Open message to byte array, without the header.- Specified by:
serializeMessagein interfaceMessageSerializer- Parameters:
msg- BGP Open message to be serialized.bytes- ByteBuf where the message will be serialized
-
parseMessageBody
public Open parseMessageBody(io.netty.buffer.ByteBuf body, int messageLength, PeerSpecificParserConstraint constraint) throws BGPDocumentedException Parses given byte array to BGP Open message.- Specified by:
parseMessageBodyin interfaceMessageParser- Parameters:
body- byte array representing BGP Open message, without headermessageLength- the length of the messageconstraint- Peer specific constraints, implementations may ignore them.- Returns:
OpenBGP Open Message- Throws:
BGPDocumentedException- if the parsing was unsuccessful
-