javax.sip
Class TransactionState
java.lang.Object
javax.sip.TransactionState
- All Implemented Interfaces:
- java.io.Serializable
public final class TransactionState
- extends java.lang.Object
- implements java.io.Serializable
This class contains the enumerations that define the underlying state of an
existing transaction. SIP defines four types of
transactions, these are Invite Client transactions, Invite Server transactions,
Non-Invite Client transactions and Non-Invite Server transactions.
There are six explicit states for the various transactions, namely:
- Calling:
- Invite Client transaction: The initial state, "calling", MUST be entered
when the application initiates a new client transaction with an INVITE request.
- Trying:
- Non-Invite Client transaction: The initial state "Trying" is entered
when the application initiates a new client transaction with a request.
- Non-Invite Server transaction: The initial state "Trying" is entered
when the application is passed a request other than INVITE or ACK.
- Proceeding:
- Invite Client transaction: If the client transaction receives a
provisional response while in the "Calling" state, it transitions to the
"Proceeding" state.
- Non-Invite Client transaction: If a provisional response is received
while in the "Trying" state, the client transaction SHOULD move to the
"Proceeding" state.
- Invite Server transaction: When a server transaction is constructed for
a request, it enters the initial state "Proceeding".
- Non-Invite Server transaction: While in the "Trying" state, if the
application passes a provisional response to the server transaction, the
server transaction MUST enter the "Proceeding" state.
- Completed: The "Completed" state exists to buffer any additional
response retransmissions that may be received, which is why the client
transaction remains there only for unreliable transports.
- Invite Client transaction: When in either the "Calling" or "Proceeding"
states, reception of a response with status code from 300-699 MUST cause the
client transaction to transition to "Completed".
- Non-Invite Client transaction: If a final response (status codes
200-699) is received while in the "Trying" or "Proceeding" state, the client
transaction MUST transition to the "Completed" state.
- Invite Server transaction: While in the "Proceeding" state, if the
application passes a response with status code from 300 to 699 to the server
transaction, the state machine MUST enter the "Completed" state.
- Non-Invite Server transaction: If the application passes a final response
(status codes 200-699) to the server while in the "Proceeding" state, the
transaction MUST enter the "Completed" state.
- Confirmed: The purpose of the "Confirmed" state is to absorb any
additional ACK messages that arrive, triggered from retransmissions of the
final response. Once this time expires the server MUST transition to the
"Terminated" state.
- Invite Server transaction: If an ACK is received while the server
transaction is in the "Completed" state, the server transaction MUST
transition to the "Confirmed" state.
- Terminated: The transaction MUST be available for garbage collection
the instant it enters the "Terminated" state.
- Invite Client transaction: When in either the "Calling" or "Proceeding"
states, reception of a 2xx response MUST cause the client transaction to
enter the "Terminated" state. If amount of time that the server transaction
can remain in the "Completed" state when unreliable transports are used
expires while the client transaction is in the "Completed" state, the client
transaction MUST move to the "Terminated" state.
- Non-Invite Client transaction: If the transaction times out while the
client transaction is still in the "Trying" or "Proceeding" state, the client
transaction SHOULD inform the application about the timeout, and then it
SHOULD enter the "Terminated" state. If the response retransmissions buffer
expires while in the "Completed" state, the client transaction MUST transition
to the "Terminated" state.
- Invite Server transaction: If in the "Proceeding" state, and the application
passes a 2xx response to the server transaction, the server transaction MUST
transition to the "Terminated" state. When the server transaction abandons
retransmitting the response while in the "Completed" state, it implies that
the ACK was never received. In this case, the server transaction MUST
transition to the "Terminated" state, and MUST indicate to the TU that a
transaction failure has occurred.
- Non-Invite Server transaction: If the request retransmissions buffer
expires while in the "Completed" state, the server transaction MUST transition
to the "Terminated" state.
For each specific transaction state machine, refer to
RFC3261.
- Author:
- BEA Systems, NIST
- See Also:
- Serialized Form
Field Summary |
static int |
_CALLING
This constant value indicates the internal value of the "Calling" constant. |
static int |
_COMPLETED
This constant value indicates the internal value of the "Completed"
constant. |
static int |
_CONFIRMED
This constant value indicates the internal value of the "Confirmed"
constant. |
static int |
_PROCEEDING
This constant value indicates the internal value of the "Proceeding"
constant. |
static int |
_TERMINATED
This constant value indicates the internal value of the "Terminated"
constant. |
static int |
_TRYING
This constant value indicates the internal value of the "Trying" constant. |
static TransactionState |
CALLING
This constant value indicates that the transaction state is "Calling". |
static TransactionState |
COMPLETED
This constant value indicates that the transaction state is "Completed". |
static TransactionState |
CONFIRMED
This constant value indicates that the transaction state is "Confirmed". |
static TransactionState |
PROCEEDING
This constant value indicates that the transaction state is "Proceeding". |
static TransactionState |
TERMINATED
This constant value indicates that the transaction state is "Terminated". |
static TransactionState |
TRYING
This constant value indicates that the transaction state is "Trying". |
Method Summary |
boolean |
equals(java.lang.Object obj)
Compare this transaction state for equality with another. |
static TransactionState |
getObject(int transactionState)
This method returns the object value of the TransactionState |
int |
getValue()
This method returns the integer value of the TransactionState |
int |
hashCode()
Get a hash code value for this transaction state. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
_CALLING
public static final int _CALLING
- This constant value indicates the internal value of the "Calling" constant.
This constant has an integer value of 0.
- See Also:
- Constant Field Values
CALLING
public static final TransactionState CALLING
- This constant value indicates that the transaction state is "Calling".
_TRYING
public static final int _TRYING
- This constant value indicates the internal value of the "Trying" constant.
This constant has an integer value of 1.
- See Also:
- Constant Field Values
TRYING
public static final TransactionState TRYING
- This constant value indicates that the transaction state is "Trying".
_PROCEEDING
public static final int _PROCEEDING
- This constant value indicates the internal value of the "Proceeding"
constant.
This constant has an integer value of 2.
- See Also:
- Constant Field Values
PROCEEDING
public static final TransactionState PROCEEDING
- This constant value indicates that the transaction state is "Proceeding".
_COMPLETED
public static final int _COMPLETED
- This constant value indicates the internal value of the "Completed"
constant.
This constant has an integer value of 3.
- See Also:
- Constant Field Values
COMPLETED
public static final TransactionState COMPLETED
- This constant value indicates that the transaction state is "Completed".
_CONFIRMED
public static final int _CONFIRMED
- This constant value indicates the internal value of the "Confirmed"
constant.
This constant has an integer value of 4.
- See Also:
- Constant Field Values
CONFIRMED
public static final TransactionState CONFIRMED
- This constant value indicates that the transaction state is "Confirmed".
_TERMINATED
public static final int _TERMINATED
- This constant value indicates the internal value of the "Terminated"
constant.
This constant has an integer value of 5.
- See Also:
- Constant Field Values
TERMINATED
public static final TransactionState TERMINATED
- This constant value indicates that the transaction state is "Terminated".
getObject
public static TransactionState getObject(int transactionState)
- This method returns the object value of the TransactionState
- Parameters:
transactionState
- The integer value of the TransactionState
- Returns:
- The TransactionState Object
getValue
public int getValue()
- This method returns the integer value of the TransactionState
- Returns:
- The integer value of the TransactionState
equals
public boolean equals(java.lang.Object obj)
- Compare this transaction state for equality with another.
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- the object to compare this with.
- Returns:
true
if obj
is an instance of this class
representing the same transaction state as this, false
otherwise.- Since:
- 1.2
hashCode
public int hashCode()
- Get a hash code value for this transaction state.
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- a hash code value.
- Since:
- 1.2
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems