public class State extends Object implements Comparable<State>
| Modifier and Type | Field and Description |
|---|---|
static State |
offline
Basic State for services that are not running.
|
static State |
online
Basic State for services that are running.
|
static State |
starting
Basic State for services that are starting.
|
static State |
stopping
Basic state for services that are stopping.
|
static State |
unknown
Basic static for services in an unknown state.
|
| Constructor and Description |
|---|
State(State basicState,
String name)
Constructs a new state that is derived from the given basic state and has
the given name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(State state)
Compares this state to the given state.
|
State |
getBasicState()
Returns the basic state of this state.
|
String |
getName()
Returns the name of this state.
|
int |
getOrdinal()
Returns the ordinal number of this state.
|
String |
toString()
Returns a textual representation of this state, consisting of the name of
this state and, if different, the name of its basic state.
|
public static final State offline
public static final State starting
public static final State online
public static final State stopping
public static final State unknown
public State getBasicState()
null.public String getName()
public int getOrdinal()
public int compareTo(State state)
compareTo in interface Comparable<State>state - The state that should be compared with this stateCopyright © 2026. All rights reserved.