asynctcp
Enum Connection.ConnectionState

java.lang.Object
  extended by java.lang.Enum<Connection.ConnectionState>
      extended by asynctcp.Connection.ConnectionState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Connection.ConnectionState>
Enclosing class:
Connection

public static enum Connection.ConnectionState
extends java.lang.Enum<Connection.ConnectionState>

An enumeration over all possible connection states.

Author:
Michael Parker

Enum Constant Summary
CONNECTED
          The local host is connected to the remote host.
CONNECTING
          The local host is connecting to the remote host.
DISCONNECTED
          The local host is disconnected from the remote host.
DISCONNECTING
          The local host is disconnecting from the remote host.
 
Method Summary
static Connection.ConnectionState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Connection.ConnectionState[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CONNECTING

public static final Connection.ConnectionState CONNECTING
The local host is connecting to the remote host.


CONNECTED

public static final Connection.ConnectionState CONNECTED
The local host is connected to the remote host.


DISCONNECTING

public static final Connection.ConnectionState DISCONNECTING
The local host is disconnecting from the remote host.


DISCONNECTED

public static final Connection.ConnectionState DISCONNECTED
The local host is disconnected from the remote host.

Method Detail

values

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

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

valueOf

public static Connection.ConnectionState 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