org.apache.geronimo.kernel.management
Class State

java.lang.Object
  extended by org.apache.geronimo.kernel.management.State
All Implemented Interfaces:
Serializable

public final class State
extends Object
implements Serializable

This class contains a type safe enumeration of the states from the J2EE Management specification.

See Also:
Serialized Form

Field Summary
static State FAILED
           
static int FAILED_INDEX
           
static State RUNNING
           
static int RUNNING_INDEX
           
static State STARTING
           
static int STARTING_INDEX
           
static State STOPPED
           
static int STOPPED_INDEX
           
static State STOPPING
           
static int STOPPING_INDEX
           
 
Method Summary
static State fromInt(int index)
          Get a State from an int index
static State fromInteger(Integer index)
          Get a State from an Integer index
 String getEventTypeValue()
          Gets the event type that should be send after changeing to this state.
 String getName()
           
 boolean isFailed()
           
 boolean isRunning()
           
 boolean isStopped()
           
 int toInt()
          Gets the integer value of this state as specified in the J2EE Management specification
 String toString()
           
static String toString(int state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STARTING_INDEX

public static final int STARTING_INDEX
See Also:
Constant Field Values

RUNNING_INDEX

public static final int RUNNING_INDEX
See Also:
Constant Field Values

STOPPING_INDEX

public static final int STOPPING_INDEX
See Also:
Constant Field Values

STOPPED_INDEX

public static final int STOPPED_INDEX
See Also:
Constant Field Values

FAILED_INDEX

public static final int FAILED_INDEX
See Also:
Constant Field Values

STARTING

public static final State STARTING

RUNNING

public static final State RUNNING

STOPPING

public static final State STOPPING

STOPPED

public static final State STOPPED

FAILED

public static final State FAILED
Method Detail

fromInt

public static State fromInt(int index)
Get a State from an int index

Parameters:
index - int index of the state
Returns:
The State instance or null if no such State.

fromInteger

public static State fromInteger(Integer index)
Get a State from an Integer index

Parameters:
index - Integer index of the state
Returns:
The State instance or null if no such State.

toString

public static String toString(int state)

toInt

public int toInt()
Gets the integer value of this state as specified in the J2EE Management specification


getEventTypeValue

public String getEventTypeValue()
Gets the event type that should be send after changeing to this state.

Returns:
the event type that should be sent after a transistion to this state

getName

public String getName()

isRunning

public boolean isRunning()

isStopped

public boolean isStopped()

isFailed

public boolean isFailed()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.