JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

jain.protocol.ip.mgcp.message.parms
Class ReasonCode

java.lang.Object
  |
  +--jain.protocol.ip.mgcp.message.parms.ReasonCode
All Implemented Interfaces:
java.io.Serializable

public final class ReasonCode
extends java.lang.Object
implements java.io.Serializable

Defines the Reason Codes that are used in DeleteConnection commands sent by the Media Gateway, in RestartInProgress commands, and in responses to Audit requests.

Reason code constants are defined for all reason codes that have been defined in RFC 2705. Each such constant is also encapsulated in a final static object of class ReasonCode, so that a reason code can be inserted in a command or response object simply by referring to one of these predefined ReasonCode objects.

Invoking getValue() on one of these objects returns the integer value that is encapsulated by the object. Invoking getComment() returns the comment associated with the reason code, as a String. Invoking toString() (which overrides java.lang.Object.toString()) returns a String that displays the integer value of the reason code, followed by the associated comment.

See Also:
Serialized Form

Field Summary
static ReasonCode Endpoint_Malfunctioning
          ReasonCode object that signifies that endpoint is malfunctioning.
static int ENDPOINT_MALFUNCTIONING
          Signifies that endpoint is malfunctioning.
static ReasonCode Endpoint_Out_Of_Service
          ReasonCode object that signifies that endpoint has been taken out of service.
static int ENDPOINT_OUT_OF_SERVICE
          Signifies that endpoint has been taken out of service.
static ReasonCode Endpoint_State_Is_Nominal
          ReasonCode object that signifies that endpoint state is nominal.
static int ENDPOINT_STATE_IS_NOMINAL
          Signifies that endpoint state is nominal.
static ReasonCode Loss_Of_Lower_Layer_Connectivity
          ReasonCode object that signifies loss of lower layer connectivity (e.g., downstream sync).
static int LOSS_OF_LOWER_LAYER_CONNECTIVITY
          Signifies loss of lower layer connectivity (e.g., downstream sync).
 
Method Summary
 java.lang.String getComment()
          Gets the return comment string set in this Reason Code object.

 int getValue()
          Gets the integer-valued reason code.

 java.lang.String toString()
          Returns the reason code, followed by the associated comment, as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Endpoint_Malfunctioning

public static final ReasonCode Endpoint_Malfunctioning
ReasonCode object that signifies that endpoint is malfunctioning.

ENDPOINT_MALFUNCTIONING

public static final int ENDPOINT_MALFUNCTIONING
Signifies that endpoint is malfunctioning.

Endpoint_Out_Of_Service

public static final ReasonCode Endpoint_Out_Of_Service
ReasonCode object that signifies that endpoint has been taken out of service.

ENDPOINT_OUT_OF_SERVICE

public static final int ENDPOINT_OUT_OF_SERVICE
Signifies that endpoint has been taken out of service.

Endpoint_State_Is_Nominal

public static final ReasonCode Endpoint_State_Is_Nominal
ReasonCode object that signifies that endpoint state is nominal.

ENDPOINT_STATE_IS_NOMINAL

public static final int ENDPOINT_STATE_IS_NOMINAL
Signifies that endpoint state is nominal. (This code is used only in response to audit requests.)

Loss_Of_Lower_Layer_Connectivity

public static final ReasonCode Loss_Of_Lower_Layer_Connectivity
ReasonCode object that signifies loss of lower layer connectivity (e.g., downstream sync).

LOSS_OF_LOWER_LAYER_CONNECTIVITY

public static final int LOSS_OF_LOWER_LAYER_CONNECTIVITY
Signifies loss of lower layer connectivity (e.g., downstream sync).
Method Detail

getComment

public java.lang.String getComment()
Gets the return comment string set in this Reason Code object.

Returns:
The string to be used as the comment associated with this Reason Code.

getValue

public int getValue()
Gets the integer-valued reason code.

Returns:
The integer value of the reason code.

toString

public java.lang.String toString()
Returns the reason code, followed by the associated comment, as a String.
Overrides:
toString in class java.lang.Object

JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

Copyright © 2000 Sun Microsystems, Inc.