Enum Service.State
- java.lang.Object
- 
- java.lang.Enum<Service.State>
- 
- com.google.common.util.concurrent.Service.State
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<Service.State>
 - Enclosing interface:
- Service
 
 public static enum Service.State extends java.lang.Enum<Service.State> The lifecycle states of a service.The ordering of the Service.Stateenum is defined such that if there is a state transition fromA -> BthenA.compareTo(B) < 0. N.B. The converse is not true, i.e. ifA.compareTo(B) < 0then there is not guaranteed to be a valid state transitionA -> B.- Since:
- 9.0 (in 1.0 as com.google.common.base.Service.State)
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description FAILEDA service in this state has encountered a problem and may not be operational.NEWA service in this state is inactive.RUNNINGA service in this state is operational.STARTINGA service in this state is transitioning toRUNNING.STOPPINGA service in this state is transitioning toTERMINATED.TERMINATEDA service in this state has completed execution normally.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Service.StatevalueOf(java.lang.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.
 
- 
- 
- 
Enum Constant Detail- 
NEWpublic static final Service.State NEW A service in this state is inactive. It does minimal work and consumes minimal resources.
 - 
STARTINGpublic static final Service.State STARTING A service in this state is transitioning toRUNNING.
 - 
RUNNINGpublic static final Service.State RUNNING A service in this state is operational.
 - 
STOPPINGpublic static final Service.State STOPPING A service in this state is transitioning toTERMINATED.
 - 
TERMINATEDpublic static final Service.State TERMINATED A service in this state has completed execution normally. It does minimal work and consumes minimal resources.
 - 
FAILEDpublic static final Service.State FAILED A service in this state has encountered a problem and may not be operational. It cannot be started nor stopped.
 
- 
 - 
Method Detail- 
valuespublic static Service.State[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Service.State c : Service.State.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static Service.State valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- java.lang.IllegalArgumentException- if this enum type has no constant with the specified name
- java.lang.NullPointerException- if the argument is null
 
 
- 
 
-