Enum Class RevisedErrorHandling

java.lang.Object
java.lang.Enum<RevisedErrorHandling>
org.opendaylight.protocol.bgp.parser.spi.RevisedErrorHandling
All Implemented Interfaces:
Serializable, Comparable<RevisedErrorHandling>, Constable

@NonNullByDefault public enum RevisedErrorHandling extends Enum<RevisedErrorHandling>
Enumeration of possible treatments an UPDATE message and attributes can get based on the configuration of a peer.
Author:
Robert Varga
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Use RFC7606 Revised Error Handling, the peer is an external neighbor.
    Use RFC7606 Revised Error Handling, the peer is an internal neighbor.
    Do not use RFC7606 Revised Error Handling.
  • Method Summary

    Modifier and Type
    Method
    Description
    from(@Nullable PeerSpecificParserConstraint constraint)
    Determine Revised Error Handling from the contents of a PeerSpecificParserConstraint.
    org.opendaylight.protocol.bgp.parser.BGPDocumentedException
    reportError(org.opendaylight.protocol.bgp.parser.BGPError error, byte[] data, String format, Object... args)
    Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
    org.opendaylight.protocol.bgp.parser.BGPDocumentedException
    reportError(org.opendaylight.protocol.bgp.parser.BGPError error, @Nullable Exception cause, String format, Object... args)
    Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
    org.opendaylight.protocol.bgp.parser.BGPDocumentedException
    reportError(org.opendaylight.protocol.bgp.parser.BGPError error, String format, Object... args)
    Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final RevisedErrorHandling NONE
      Do not use RFC7606 Revised Error Handling.
    • INTERNAL

      public static final RevisedErrorHandling INTERNAL
      Use RFC7606 Revised Error Handling, the peer is an internal neighbor.
    • EXTERNAL

      public static final RevisedErrorHandling EXTERNAL
      Use RFC7606 Revised Error Handling, the peer is an external neighbor.
  • Method Details

    • values

      public static RevisedErrorHandling[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RevisedErrorHandling valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • from

      public static RevisedErrorHandling from(@Nullable PeerSpecificParserConstraint constraint)
      Determine Revised Error Handling from the contents of a PeerSpecificParserConstraint.
      Parameters:
      constraint - Peer-specific constraint
      Returns:
      Revised Error Handling treatment message/attributes should receive.
    • reportError

      public org.opendaylight.protocol.bgp.parser.BGPDocumentedException reportError(org.opendaylight.protocol.bgp.parser.BGPError error, @Nullable Exception cause, String format, Object... args) throws org.opendaylight.protocol.bgp.parser.BGPDocumentedException, org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException
      Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
      Parameters:
      error - BGPError to report in case of a session teardown
      cause - Parsing failure cause
      format - Message format string
      args - Message format arguments
      Returns:
      This method does not return
      Throws:
      org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException - if Revised Error Handling is in effect
      org.opendaylight.protocol.bgp.parser.BGPDocumentedException - if Revised Error Handling is in not effect
    • reportError

      public org.opendaylight.protocol.bgp.parser.BGPDocumentedException reportError(org.opendaylight.protocol.bgp.parser.BGPError error, String format, Object... args) throws org.opendaylight.protocol.bgp.parser.BGPDocumentedException, org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException
      Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
      Parameters:
      error - BGPError to report in case of a session teardown
      format - Message format string
      args - Message format arguments
      Returns:
      This method does not return
      Throws:
      org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException - if Revised Error Handling is in effect
      org.opendaylight.protocol.bgp.parser.BGPDocumentedException - if Revised Error Handling is in not effect
    • reportError

      public org.opendaylight.protocol.bgp.parser.BGPDocumentedException reportError(org.opendaylight.protocol.bgp.parser.BGPError error, byte[] data, String format, Object... args) throws org.opendaylight.protocol.bgp.parser.BGPDocumentedException, org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException
      Report a failure to parse an attribute resulting either in treat-as-withdraw if RFC7606 is in effect, or connection teardown if it is not.
      Parameters:
      error - BGPError to report in case of a session teardown
      format - Message format string
      args - Message format arguments
      Returns:
      This method does not return
      Throws:
      org.opendaylight.protocol.bgp.parser.BGPTreatAsWithdrawException - if Revised Error Handling is in effect
      org.opendaylight.protocol.bgp.parser.BGPDocumentedException - if Revised Error Handling is in not effect