Class ParameterUtil

java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.ParameterUtil

public final class ParameterUtil extends Object
Utility class which is intended for formatting parameter.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    formatExtendedParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
    Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.
    static void
    formatParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
    Adds header to parameter value in RFC4271 format.

    Methods inherited from class java.lang.Object

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

    • formatParameter

      public static void formatParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) throws ParameterLengthOverflowException
      Adds header to parameter value in RFC4271 format.
      Parameters:
      type - of the parameter
      value - parameter value
      buffer - ByteBuf where the parameter will be copied with its header
      Throws:
      IllegalArgumentException - if value length exceeds 255 bytes
      ParameterLengthOverflowException
    • formatExtendedParameter

      public static void formatExtendedParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
      Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.
      Parameters:
      type - of the parameter
      value - parameter value
      buffer - ByteBuf where the parameter will be copied with its header
      Throws:
      IllegalArgumentException - if value length exceeds 65535 bytes