Package org.onosproject.netconf
Class NetconfRpcError
- java.lang.Object
-
- org.onosproject.netconf.NetconfRpcError
-
@Beta public class NetconfRpcError extends java.lang.ObjectWrapper aroundRpcErrorTypefor ease of handling and logging.- See Also:
NetconfRpcParserUtil
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBAD_ATTRIBUTEProtocol mandated error-info: "bad-attribute".static java.lang.StringBAD_ELEMENTProtocol mandated error-info: "bad-element".static java.lang.StringBAD_NAMESPACEProtocol mandated error-info: "bad-namespace".static java.lang.StringERR_ELEMENTProtocol mandated error-info: "err-element".static java.lang.StringNOOP_ELEMENTProtocol mandated error-info: "noop-element".static java.lang.StringOK_ELEMENTProtocol mandated error-info: "ok-element".
-
Constructor Summary
Constructors Modifier Constructor Description protectedNetconfRpcError(RpcErrorType msg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>appTag()Returns a string identifying the data-model-specific or implementation-specific error condition, if one exists.java.util.Map<java.lang.String,java.lang.String>info()Returns protocol-mandated contents if any.java.util.List<java.lang.Object>infoAny()Returns any other elements if present.java.util.Optional<java.lang.Long>infoSessionId()Returns session-id in error-info if any.java.lang.Stringmessage()Returns human readable error message.java.util.Optional<java.lang.String>path()Returns absolute XPath expression identifying the element path to the node that is associated with the error being reported.java.util.Optional<ErrorInfoType>rawInfo()Returns protocol- or data-model-specific error content.ErrorSeverityseverity()Returns error severity.ErrorTagtag()Returns a tag identifying the error condition.java.lang.StringtoString()ErrorTypetype()Returns conceptual layer that the error occurred.static NetconfRpcErrorwrap(RpcErrorType msg)
-
-
-
Field Detail
-
BAD_ATTRIBUTE
public static final java.lang.String BAD_ATTRIBUTE
Protocol mandated error-info: "bad-attribute".- See Also:
- Constant Field Values
-
BAD_ELEMENT
public static final java.lang.String BAD_ELEMENT
Protocol mandated error-info: "bad-element".- See Also:
- Constant Field Values
-
OK_ELEMENT
public static final java.lang.String OK_ELEMENT
Protocol mandated error-info: "ok-element".- See Also:
- Constant Field Values
-
ERR_ELEMENT
public static final java.lang.String ERR_ELEMENT
Protocol mandated error-info: "err-element".- See Also:
- Constant Field Values
-
NOOP_ELEMENT
public static final java.lang.String NOOP_ELEMENT
Protocol mandated error-info: "noop-element".- See Also:
- Constant Field Values
-
BAD_NAMESPACE
public static final java.lang.String BAD_NAMESPACE
Protocol mandated error-info: "bad-namespace".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NetconfRpcError
protected NetconfRpcError(RpcErrorType msg)
-
-
Method Detail
-
wrap
public static final NetconfRpcError wrap(RpcErrorType msg)
-
type
public ErrorType type()
Returns conceptual layer that the error occurred.- Returns:
- the type
-
tag
public ErrorTag tag()
Returns a tag identifying the error condition.- Returns:
- the tag
-
severity
public ErrorSeverity severity()
Returns error severity.- Returns:
- severity
-
appTag
public java.util.Optional<java.lang.String> appTag()
Returns a string identifying the data-model-specific or implementation-specific error condition, if one exists.- Returns:
- app tag
-
path
public java.util.Optional<java.lang.String> path()
Returns absolute XPath expression identifying the element path to the node that is associated with the error being reported.- Returns:
- XPath expression
-
message
public java.lang.String message()
Returns human readable error message.- Returns:
- message
-
infoSessionId
public java.util.Optional<java.lang.Long> infoSessionId()
Returns session-id in error-info if any.- Returns:
- session-id
-
info
@Beta public java.util.Map<java.lang.String,java.lang.String> info()
Returns protocol-mandated contents if any.- Returns:
- Map containing protocol-mandated contents
Possible Map keys:
BAD_ATTRIBUTE,BAD_ELEMENT,OK_ELEMENT,ERR_ELEMENT,NOOP_ELEMENT,BAD_NAMESPACE
-
infoAny
@Beta public java.util.List<java.lang.Object> infoAny()
Returns any other elements if present.- Returns:
- any other elements
-
rawInfo
@Beta public java.util.Optional<ErrorInfoType> rawInfo()
Returns protocol- or data-model-specific error content.- Returns:
- error info
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-