Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Class CallState

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.CallState

public class CallState
extends Object

The CallState class reflects the current state of a call. Compared to the state of a single call peer, a call itself has a more limited amount of sets which follow the following cycle:

CALL_INITIALIZATION -> CALL_IN_PROGRESS -> CALL_ENDED

When you start calling someone or receive a call alert, the call that is automatically created is in the CALL_INITIALIZATION_PHASE. As soon as one of the peers passes into a CONNECTED call peer state, the call would enter the CALL_IN_PROGRESS state. When the last call peer enters a DISCONNECTED state the call itself would go into the CALL_ENDED state and will be ready for garbage collection.

Author:
Emil Ivov

Field Summary
static String _CALL_ENDED
          This constant containing a String representation of the CALL_ENDED state.
static String _CALL_IN_PROGRESS
          This constant containing a String representation of the CALL_IN_PROGRESS state.
static String _CALL_INITIALIZATION
          This constant containing a String representation of the CALL_INITIALIZATION state.
static String _CALL_REFERRED
          This constant containing a String representation of the CALL_REFERED state.
static CallState CALL_ENDED
          This constant value indicates that the associated call is currently in a terminated phase.
static CallState CALL_IN_PROGRESS
          This constant value indicates that the associated call is currently in an active state.
static CallState CALL_INITIALIZATION
          This constant value indicates that the associated call is currently in an initialization state.
static CallState CALL_REFERRED
          This constant value indicates that the associated call is currently referred.
 
Method Summary
 String getStateString()
          Returns a String representation of this CallState.
 String toString()
          Returns a string representation of this call state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_CALL_INITIALIZATION

public static final String _CALL_INITIALIZATION
This constant containing a String representation of the CALL_INITIALIZATION state.

This constant has the String value "Initializing".

See Also:
Constant Field Values

CALL_INITIALIZATION

public static final CallState CALL_INITIALIZATION
This constant value indicates that the associated call is currently in an initialization state.


_CALL_IN_PROGRESS

public static final String _CALL_IN_PROGRESS
This constant containing a String representation of the CALL_IN_PROGRESS state.

This constant has the String value "In Progress".

See Also:
Constant Field Values

CALL_IN_PROGRESS

public static final CallState CALL_IN_PROGRESS
This constant value indicates that the associated call is currently in an active state.


_CALL_ENDED

public static final String _CALL_ENDED
This constant containing a String representation of the CALL_ENDED state.

This constant has the String value "Ended".

See Also:
Constant Field Values

CALL_ENDED

public static final CallState CALL_ENDED
This constant value indicates that the associated call is currently in a terminated phase.


_CALL_REFERRED

public static final String _CALL_REFERRED
This constant containing a String representation of the CALL_REFERED state.

This constant has the String value "Referred".

See Also:
Constant Field Values

CALL_REFERRED

public static final CallState CALL_REFERRED
This constant value indicates that the associated call is currently referred.

Method Detail

getStateString

public String getStateString()
Returns a String representation of this CallState.

Returns:
a string value (one of the _CALL_XXX constants) representing this call state).

toString

public String toString()
Returns a string representation of this call state. Strings returned by this method have the following format: "CallState:" and are meant to be used for logging/debugging purposes.

Overrides:
toString in class Object
Returns:
a string representation of this object.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.