Asterisk-Java

org.asteriskjava.manager
Enum ManagerConnectionState

java.lang.Object
  extended by java.lang.Enum<ManagerConnectionState>
      extended by org.asteriskjava.manager.ManagerConnectionState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ManagerConnectionState>

public enum ManagerConnectionState
extends java.lang.Enum<ManagerConnectionState>

The lifecycle status of a ManagerConnection.

Since:
0.3
Author:
srt

Enum Constant Summary
CONNECTED
          The connection has been successfully established, login has been perfomed and the connection is ready to be used.
CONNECTING
          The connection is being made and login is performed.
DISCONNECTED
          The connection has been closed on user's request is not about to be reestablished.
DISCONNECTING
          The connection is about to be closed by user request.
INITIAL
          The initial state after the ManagerConnection object has been created but the connection has not yet been established.
RECONNECTING
          The connection has been disrupted and is about to be reestablished.
 
Method Summary
static ManagerConnectionState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ManagerConnectionState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INITIAL

public static final ManagerConnectionState INITIAL
The initial state after the ManagerConnection object has been created but the connection has not yet been established.

Changes to CONNECTING when ManagerConnection.login() is called.


CONNECTING

public static final ManagerConnectionState CONNECTING
The connection is being made and login is performed.

Changes to CONNECTED when login has successfully completed or DISCONNECTED if login fails.


CONNECTED

public static final ManagerConnectionState CONNECTED
The connection has been successfully established, login has been perfomed and the connection is ready to be used.

This is the required state for sending actions to the Asterisk server.

Changes to RECONNECTING when connection is lost or DISCONNECTING when ManagerConnection.logoff() is called.


RECONNECTING

public static final ManagerConnectionState RECONNECTING
The connection has been disrupted and is about to be reestablished.

Changes to CONNECTED when connection is successfully reestablished or DISCONNECTING when ManagerConnection.logoff() is called.


DISCONNECTING

public static final ManagerConnectionState DISCONNECTING
The connection is about to be closed by user request.

Changes to DISCONNECTED when connection has been closed.


DISCONNECTED

public static final ManagerConnectionState DISCONNECTED
The connection has been closed on user's request is not about to be reestablished.

Can be changed to CONNECTING by calling ManagerConnection.login().

Method Detail

values

public static ManagerConnectionState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ManagerConnectionState c : ManagerConnectionState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ManagerConnectionState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.