@Beta public static enum Service.State extends Enum<Service.State>
The ordering of the Service.State
enum is defined such that if there is a state transition
from A -> B
then A.compareTo(B) < 0
. N.B. The converse is not true, i.e. if
A.compareTo(B) < 0
then there is not guaranteed to be a valid state transition
A -> B
.
com.google.common.base.Service.State
)Enum Constant and Description |
---|
FAILED
A service in this state has encountered a problem and may not be operational.
|
NEW
A service in this state is inactive.
|
RUNNING
A service in this state is operational.
|
STARTING
A service in this state is transitioning to
RUNNING . |
STOPPING
A service in this state is transitioning to
TERMINATED . |
TERMINATED
A service in this state has completed execution normally.
|
Modifier and Type | Method and Description |
---|---|
static Service.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Service.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Service.State NEW
public static final Service.State STARTING
RUNNING
.public static final Service.State RUNNING
public static final Service.State STOPPING
TERMINATED
.public static final Service.State TERMINATED
public static final Service.State FAILED
public static Service.State[] values()
for (Service.State c : Service.State.values()) System.out.println(c);
public static Service.State valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2010–2017. All rights reserved.