Class BGPOpenMessageParser

java.lang.Object
org.opendaylight.protocol.bgp.parser.impl.message.BGPOpenMessageParser
All Implemented Interfaces:
org.opendaylight.protocol.bgp.parser.spi.MessageParser, org.opendaylight.protocol.bgp.parser.spi.MessageSerializer

public final class BGPOpenMessageParser extends Object implements org.opendaylight.protocol.bgp.parser.spi.MessageParser, org.opendaylight.protocol.bgp.parser.spi.MessageSerializer
Parser for BGP Open message.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BGPOpenMessageParser(org.opendaylight.protocol.bgp.parser.spi.ParameterRegistry reg)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Open
    parseMessageBody(io.netty.buffer.ByteBuf body, int messageLength, org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint constraint)
    Parses given byte array to BGP Open message.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • BGPOpenMessageParser

      public BGPOpenMessageParser(org.opendaylight.protocol.bgp.parser.spi.ParameterRegistry reg)
  • 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:
      serializeMessage in interface org.opendaylight.protocol.bgp.parser.spi.MessageSerializer
      Parameters:
      msg - BGP Open message to be serialized.
      bytes - ByteBuf where the message will be serialized
    • parseMessageBody

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Open parseMessageBody(io.netty.buffer.ByteBuf body, int messageLength, org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint constraint) throws org.opendaylight.protocol.bgp.parser.BGPDocumentedException
      Parses given byte array to BGP Open message.
      Specified by:
      parseMessageBody in interface org.opendaylight.protocol.bgp.parser.spi.MessageParser
      Parameters:
      body - byte array representing BGP Open message, without header
      messageLength - the length of the message
      Returns:
      Open BGP Open Message
      Throws:
      org.opendaylight.protocol.bgp.parser.BGPDocumentedException - if the parsing was unsuccessful