org.cipango.diameter
Class ResultCode

java.lang.Object
  extended by org.cipango.diameter.ResultCode

public class ResultCode
extends java.lang.Object

A result code consits of

The summary of result codes is [RFC 3588]: IETF result codes are defined in Common. 3GPP result codes are defined in Cx, Sh, Zh.


Constructor Summary
ResultCode(int vendorId, int code, java.lang.String name)
           
 
Method Summary
 AVP<?> getAVP()
           
 int getCode()
           
 java.lang.String getName()
           
 int getVendorId()
           
 boolean isExperimentalResultCode()
          Returns true if the AVP is an Common.EXPERIMENTAL_RESULT_CODE.
 boolean isInformational()
          Return true if code is 1XXX.
 boolean isPermanentFailure()
          Returns true if code is 5XXX.
 boolean isProtocolError()
          Returns true if code is 3XXX.
 boolean isSuccess()
          Returns true if code is 2XXX.
 boolean isTransientFailure()
          Returns true if code is 4XXX.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultCode

public ResultCode(int vendorId,
                  int code,
                  java.lang.String name)
Method Detail

getCode

public int getCode()

getName

public java.lang.String getName()

isInformational

public boolean isInformational()
Return true if code is 1XXX. Errors that fall within this category are used to inform the requester that a request could not be satisfied, and additional action is required on its part before access is granted.

Returns:
true if code is 1XXX.

isSuccess

public boolean isSuccess()
Returns true if code is 2XXX. Errors that fall within the Success category are used to inform a peer that a request has been successfully completed.

Returns:
true if code is 2XXX.

isProtocolError

public boolean isProtocolError()
Returns true if code is 3XXX. Errors that fall within the Protocol Error category SHOULD be treated on a per-hop basis, and Diameter proxies MAY attempt to correct the error, if it is possible. Note that these and only these errors MUST only be used in answer messages whose 'E' bit is set.

Returns:
true if code is 3XXX.

isTransientFailure

public boolean isTransientFailure()
Returns true if code is 4XXX. Errors that fall within the transient failures category are used to inform a peer that the request could not be satisfied at the time it was received, but MAY be able to satisfy the request in the future.

Returns:
true if code is 4XXX.

isPermanentFailure

public boolean isPermanentFailure()
Returns true if code is 5XXX. Errors that fall within the permanent failures category are used to inform the peer that the request failed, and should not be attempted again.

Returns:
true if code is 5XXX.

getVendorId

public int getVendorId()

isExperimentalResultCode

public boolean isExperimentalResultCode()
Returns true if the AVP is an Common.EXPERIMENTAL_RESULT_CODE.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getAVP

public AVP<?> getAVP()


Copyright © 2010. All Rights Reserved.