org.jabber.jabberbeans
Class ConnectionEvent.EState

java.lang.Object
  |
  +--org.jabber.jabberbeans.ConnectionEvent.EState
Enclosing class:
ConnectionEvent

public static final class ConnectionEvent.EState
extends java.lang.Object

EState is an enumerator class; it provides an immutable reference on the current state of the connection to a jabber server.

Author:
David Waite <dwaite@jabber.com>

Field Summary
static int CONNECTED
           
static int CONNECTING
           
static int DISCONNECTED
           
static int NOT_SET
           
private  int value
          stores the value of the enumeration - initially 'not set'
 
Constructor Summary
protected ConnectionEvent.EState(int newVal)
          Creates a new immutable EState instance.
 
Method Summary
 int getValue()
          getValue returns the value of the enumeration.
 java.lang.String toString()
          converts the value to a string for display.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

NOT_SET

public static final int NOT_SET

DISCONNECTED

public static final int DISCONNECTED

CONNECTING

public static final int CONNECTING

CONNECTED

public static final int CONNECTED

value

private int value
stores the value of the enumeration - initially 'not set'
Constructor Detail

ConnectionEvent.EState

protected ConnectionEvent.EState(int newVal)
                          throws java.lang.IllegalArgumentException
Creates a new immutable EState instance.
Parameters:
newVal - an int value, meant to be one of the connection states defined in this class
Throws:
java.lang.IllegalArgumentException - if an illegal state is declared
Method Detail

toString

public java.lang.String toString()
converts the value to a string for display.
Overrides:
toString in class java.lang.Object
Returns:
a String holding the enumeration type name

getValue

public int getValue()
getValue returns the value of the enumeration.
Returns:
an int value corresponding to the enumeration