org.jcoderz.commons.connector.http.transport
Class HttpConnectionState

java.lang.Object
  extended by org.jcoderz.commons.connector.http.transport.HttpConnectionState
All Implemented Interfaces:
Serializable, EnumType, StrongType

public final class HttpConnectionState
extends Object
implements Serializable, EnumType

Enumerated type of a http connection state. Instances of this class are immutable. The following http connection states are defined:

The values of this enum have a internal sequential integer representation starting with '0'.

Author:
generated
See Also:
Serialized Form

Field Summary
static HttpConnectionState CONNECTION_CLOSED
          The HttpConnectionState connection closed.
static HttpConnectionState CONNECTION_ESTABLISHED
          The HttpConnectionState connection established.
static HttpConnectionState CONNECTION_EXECUTED
          The HttpConnectionState connection executed.
static HttpConnectionState CONNECTION_NOT_ESTABLISHED
          The HttpConnectionState connection not established.
static HttpConnectionState CONNECTION_RELEASED
          The HttpConnectionState connection released.
static String TYPE_NAME
          The name of this type.
static Map VALUE_MAP
          Immutable map using the name string as key holding the HttpConnectionStates as values.
static List VALUES
          Immutable list of the HttpConnectionStates.
 
Method Summary
static HttpConnectionState fromInt(int i)
          Creates a HttpConnectionState object from its int representation.
static HttpConnectionState fromString(String str)
          Creates a HttpConnectionState object from its String representation.
 int toInt()
          Returns the int representation of this http connection state.
 String toString()
          Returns the String representation of this http connection state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
The name of this type.

See Also:
Constant Field Values

CONNECTION_NOT_ESTABLISHED

public static final HttpConnectionState CONNECTION_NOT_ESTABLISHED
The HttpConnectionState connection not established.


CONNECTION_ESTABLISHED

public static final HttpConnectionState CONNECTION_ESTABLISHED
The HttpConnectionState connection established.


CONNECTION_EXECUTED

public static final HttpConnectionState CONNECTION_EXECUTED
The HttpConnectionState connection executed.


CONNECTION_RELEASED

public static final HttpConnectionState CONNECTION_RELEASED
The HttpConnectionState connection released.


CONNECTION_CLOSED

public static final HttpConnectionState CONNECTION_CLOSED
The HttpConnectionState connection closed.


VALUES

public static final List VALUES
Immutable list of the HttpConnectionStates.


VALUE_MAP

public static final Map VALUE_MAP
Immutable map using the name string as key holding the HttpConnectionStates as values.

Method Detail

fromInt

public static HttpConnectionState fromInt(int i)
                                   throws ArgumentMalformedException
Creates a HttpConnectionState object from its int representation.

Parameters:
i - the integer representation of the http connection state.
Returns:
the HttpConnectionState object represented by this int.
Throws:
ArgumentMalformedException - If the assigned int value isn't listed in the internal http connection state table.

fromString

public static HttpConnectionState fromString(String str)
                                      throws ArgumentMalformedException
Creates a HttpConnectionState object from its String representation.

Parameters:
str - the string representation of the http connection state.
Returns:
the HttpConnectionState object represented by this str.
Throws:
ArgumentMalformedException - If the given str value isn't listed in the internal http connection state table.

toInt

public int toInt()
Returns the int representation of this http connection state.

Specified by:
toInt in interface EnumType
Returns:
the int representation of this http connection state.

toString

public String toString()
Returns the String representation of this http connection state.

Overrides:
toString in class Object
Returns:
the String representation of this http connection state.


Copyright 2007 The jCoderZ Project.