public final class SleeState extends Object implements Serializable
A singleton instance of each enumerated value is guaranteed (via an implementation
of readResolve()
- refer java.io.Serializable
),
so that equality tests using ==
are always evaluated correctly. (This
equality test is only guaranteed if this class is loaded in the application's boot class
path, rather than dynamically loaded at runtime.)
Modifier and Type | Field and Description |
---|---|
static SleeState |
RUNNING
In the RUNNING state the SLEE and resource adaptors are generating events
and the SLEE's event routing subsystem is actively creating SBBs and delivering
events to them.
|
static String |
RUNNING_STRING
A string representation of the
RUNNING state. |
static int |
SLEE_RUNNING
An integer representation of the
RUNNING state. |
static int |
SLEE_STARTING
An integer representation of the
STARTING state. |
static int |
SLEE_STOPPED
An integer representation of the
STOPPED state. |
static int |
SLEE_STOPPING
An integer representation of the
STOPPING state. |
static SleeState |
STARTING
|
static String |
STARTING_STRING
A string representation of the
STARTING state. |
static SleeState |
STOPPED
The STOPPED state is the initial state for the SLEE on startup.
|
static String |
STOPPED_STRING
A string representation of the
STOPPED state. |
static SleeState |
STOPPING
|
static String |
STOPPING_STRING
A string representation of the
STOPPING state. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare this SLEE state for equality with another.
|
static SleeState |
fromInt(int state)
Get a
SleeState object from an integer value. |
static SleeState |
fromString(String state)
Get a
SleeState object from a string value. |
int |
hashCode()
Get a hash code value for this SLEE state.
|
boolean |
isRunning()
Determine if this SleeState object represents the RUNNING state of the SLEE.
|
boolean |
isStarting()
Determine if this SleeState object represents the STARTING state of the SLEE.
|
boolean |
isStopped()
Determine if this SleeState object represents the STOPPED state of the SLEE.
|
boolean |
isStopping()
Determine if this SleeState object represents the STOPPING state of the SLEE.
|
int |
toInt()
Get an integer value representation for this
SleeState object. |
String |
toString()
Get the textual representation of the SLEE state object.
|
public static final int SLEE_STOPPED
STOPPED
state.public static final int SLEE_STARTING
STARTING
state.public static final int SLEE_RUNNING
RUNNING
state.public static final int SLEE_STOPPING
STOPPING
state.public static final String STOPPED_STRING
STOPPED
state.public static final String STARTING_STRING
STARTING
state.public static final String RUNNING_STRING
RUNNING
state.public static final String STOPPING_STRING
STOPPING
state.public static final SleeState STOPPED
public static final SleeState STARTING
public static final SleeState RUNNING
public static final SleeState STOPPING
public static SleeState fromInt(int state) throws IllegalArgumentException
SleeState
object from an integer value.state
- the state as an integer.SleeState
object corresponding to state
.IllegalArgumentException
- if state
is not a valid SLEE
state value.public static SleeState fromString(String state) throws NullPointerException, IllegalArgumentException
SleeState
object from a string value.state
- the state as a string, for example as returned by the toString()
method (case insensitive).SleeState
object corresponding to state
.NullPointerException
- if state
is null
.IllegalArgumentException
- if state
is not a valid SLEE
state string.public int toInt()
SleeState
object.SleeState
object.public boolean isStopped()
This method is effectively equivalent to the conditional test:
(this == STOPPED)
, ie. the code:
if (state.isStopped()) ...
is interchangeable with the code:
if (state == SleeState.STOPPED) ...
true
if this object represents the STOPPED state of the SLEE,
false
otherwise.public boolean isStarting()
This method is effectively equivalent to the conditional test:
(this == STARTING)
, ie. the code:
if (state.isStarting()) ...
is interchangeable with the code:
if (state == SleeState.STARTING) ...
true
if this object represents the STARTING state of the SLEE,
false
otherwise.public boolean isRunning()
This method is effectively equivalent to the conditional test:
(this == RUNNING)
, ie. the code:
if (state.isRunning()) ...
is interchangeable with the code:
if (state == SleeState.RUNNING) ...
true
if this object represents the RUNNING state of the SLEE,
false
otherwise.public boolean isStopping()
This method is effectively equivalent to the conditional test:
(this == STOPPING)
, ie. the code:
if (state.isStopping()) ...
is interchangeable with the code:
if (state == SleeState.STOPPING) ...
true
if this object represents the STOPPING state of the SLEE,
false
otherwise.public boolean equals(Object obj)
public int hashCode()