Package com.bea.wcp.diameter
Class ResultCode
java.lang.Object
com.bea.wcp.diameter.ResultCode
Diameter result code. Each result code corresponds to either a Result-Code
or Experimental-Result AVP within a Diameter answer message. This class
also defines constants for the base Diameter protocol result codes.
- Author:
- Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCodestatic final ResultCode -
Method Summary
Modifier and TypeMethodDescriptionstatic ResultCodeIf the specified AVP is a Result-Code or Experimental-Result AVP, then returns a new ResultCode for the result.static ResultCodeCreates a new "experimental" ResultCode with the specified numeric code, vendor id, and error message.static ResultCodeCreates a new ResultCode for the specified numeric code and error message.booleangetAvp()intgetCode()Returns the numeric result code.Returns the result code error message or null if none.intIf this is an experimental result code, then returns the vendor id, otherwise returns 0.inthashCode()booleanReturns true if this is an experimental result.booleanReturns true if this is an informational result.booleanReturns true if this is a permanent failure.booleanReturns true if this is a protocol error.static booleanisResultCode(Avp avp) Returns true if the specified AVP is a Result-Code AVP.booleanReturns true if this is a successful result.booleanReturns true if this is a transient errortoString()
-
Field Details
-
MULTI_ROUND_AUTH
-
SUCCESS
-
LIMITED_SUCCESS
-
COMMAND_UNSUPPORTED
-
UNABLE_TO_DELIVER
-
REALM_NOT_SERVED
-
TOO_BUSY
-
LOOP_DETECTED
-
REDIRECT_INDICATION
-
APPLICATION_UNSUPPORTED
-
INVALID_HDR_BITS
-
INVALID_AVP_BITS
-
UNKNOWN_PEER
-
AUTHENTICATION_REJECTED
-
OUT_OF_SPACE
-
ELECTION_LOST
-
DIAMETER_CREDIT_LIMIT_REACHED
-
AVP_UNSUPPORTED
-
UNKNOWN_SESSION_ID
-
AUTHORIZATION_REJECTED
-
INVALID_AVP_VALUE
-
MISSING_AVP
-
RESOURCES_EXCEEDED
-
CONTRADICTING_AVPS
-
AVP_NOT_ALLOWED
-
AVP_OCCURS_TOO_MANY_TIMES
-
NO_COMMON_APPLICATION
-
UNSUPPORTED_VERSION
-
UNABLE_TO_COMPLY
-
INVALID_BIT_IN_HEADER
-
INVALID_AVP_LENGTH
-
INVALID_MESSAGE_LENGTH
-
INVALID_AVP_BIT_COMBO
-
NO_COMMON_SECURITY
-
DIAMETER_USER_UNKNOWN
-
DIAMETER_RATING_FAILED
-
-
Method Details
-
define
Creates a new "experimental" ResultCode with the specified numeric code, vendor id, and error message.- Parameters:
code- the numeric result codevendorId- the vendor idmsg- the error message, or null if none- Returns:
- the corresponding ResultCode
-
define
Creates a new ResultCode for the specified numeric code and error message.- Parameters:
code- the numeric result codemsg- the error message, or null if none- Returns:
- the corresponding ResultCode
-
getCode
public int getCode()Returns the numeric result code. -
getVendorId
public int getVendorId()If this is an experimental result code, then returns the vendor id, otherwise returns 0. -
getMessage
Returns the result code error message or null if none. -
isInformational
public boolean isInformational()Returns true if this is an informational result. -
isSuccess
public boolean isSuccess()Returns true if this is a successful result. -
isProtocolError
public boolean isProtocolError()Returns true if this is a protocol error. -
isTransientFailure
public boolean isTransientFailure()Returns true if this is a transient error -
isPermanentFailure
public boolean isPermanentFailure()Returns true if this is a permanent failure. -
isExperimental
public boolean isExperimental()Returns true if this is an experimental result. -
decode
If the specified AVP is a Result-Code or Experimental-Result AVP, then returns a new ResultCode for the result. Returns null if the AVP is not a result code AVP.- Parameters:
avp- the AVP to be decoded- Returns:
- the ResultCode, or null if none
- Throws:
AvpException- if the result code AVP was invalid
-
isResultCode
Returns true if the specified AVP is a Result-Code AVP.- Parameters:
avp- the AVP to be checked- Returns:
- true if a Result-Code AVP, false if not
-
getAvp
-
equals
-
hashCode
public int hashCode() -
toString
-
appendXml
-