Interface AttributeRegistry


@NonNullByDefault public interface AttributeRegistry
Attribute serializer/deserializer registry, exposing the capability to parse BGP attributes as a whole.
  • Method Details

    • parseAttributes

      ParsedAttributes parseAttributes(io.netty.buffer.ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraints) throws BGPDocumentedException, BGPParsingException
      Parse BGP Attribute from buffer.
      Parameters:
      buffer - Input buffer.
      constraints - Peer specific constraint.
      Returns:
      Decoded BGP Attribute.
      Throws:
      BGPDocumentedException - when an unrecoverable error occurs, which is documented via BGPError
      BGPParsingException - when a general unrecoverable parsing error occurs
    • serializeAttribute

      void serializeAttribute(Attributes attribute, io.netty.buffer.ByteBuf byteAggregator)
      Serialize BGP Attribute to buffer.
      Parameters:
      attribute - Input BGP Attribute.
      byteAggregator - Output buffer.