Enum RevisedErrorHandling
- java.lang.Object
- 
- java.lang.Enum<RevisedErrorHandling>
- 
- org.opendaylight.protocol.bgp.parser.spi.RevisedErrorHandling
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<RevisedErrorHandling>
 
 @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
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RevisedErrorHandlingfrom(@Nullable PeerSpecificParserConstraint constraint)Determine Revised Error Handling from the contents of aPeerSpecificParserConstraint.BGPDocumentedExceptionreportError(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.BGPDocumentedExceptionreportError(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.BGPDocumentedExceptionreportError(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.static RevisedErrorHandlingvalueOf(String name)Returns the enum constant of this type with the specified name.static RevisedErrorHandling[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
NONEpublic static final RevisedErrorHandling NONE Do not use RFC7606 Revised Error Handling.
 - 
INTERNALpublic static final RevisedErrorHandling INTERNAL Use RFC7606 Revised Error Handling, the peer is an internal neighbor.
 - 
EXTERNALpublic static final RevisedErrorHandling EXTERNAL Use RFC7606 Revised Error Handling, the peer is an external neighbor.
 
- 
 - 
Method Detail- 
valuespublic static RevisedErrorHandling[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RevisedErrorHandling c : RevisedErrorHandling.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static RevisedErrorHandling valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
- NullPointerException- if the argument is null
 
 - 
frompublic static RevisedErrorHandling from(@Nullable PeerSpecificParserConstraint constraint) Determine Revised Error Handling from the contents of aPeerSpecificParserConstraint.- Parameters:
- constraint- Peer-specific constraint
- Returns:
- Revised Error Handling treatment message/attributes should receive.
 
 - 
reportErrorpublic BGPDocumentedException reportError(BGPError error, @Nullable Exception cause, String format, Object... args) throws BGPDocumentedException, 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-- BGPErrorto 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:
- BGPTreatAsWithdrawException- if Revised Error Handling is in effect
- BGPDocumentedException- if Revised Error Handling is in not effect
 
 - 
reportErrorpublic BGPDocumentedException reportError(BGPError error, String format, Object... args) throws BGPDocumentedException, 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-- BGPErrorto report in case of a session teardown
- format- Message format string
- args- Message format arguments
- Returns:
- This method does not return
- Throws:
- BGPTreatAsWithdrawException- if Revised Error Handling is in effect
- BGPDocumentedException- if Revised Error Handling is in not effect
 
 - 
reportErrorpublic BGPDocumentedException reportError(BGPError error, byte[] data, String format, Object... args) throws BGPDocumentedException, 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-- BGPErrorto report in case of a session teardown
- format- Message format string
- args- Message format arguments
- Returns:
- This method does not return
- Throws:
- BGPTreatAsWithdrawException- if Revised Error Handling is in effect
- BGPDocumentedException- if Revised Error Handling is in not effect
 
 
- 
 
-