Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.google.common.util.concurrent
Enum Service.State

    java.lang.Object
      java.lang.Enum<Service.State>
          com.google.common.util.concurrent.Service.State

All Implemented Interfaces:
  Serializable, Comparable<Service.State>

Enclosing interface:
  Service

    @Beta
    public static enum Service.State

extends Enum<Service.State>

The lifecycle states of a service.

Since:
  9.0 (in 1.0 as `com.google.common.base.Service.State`)

Enum Constant Summary
`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.

Method Summary
`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.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### NEW

    public static final Service.State NEW

  A service in this state is inactive. It does minimal work and consumes minimal resources.

### STARTING

    public static final Service.State STARTING

  A service in this state is transitioning to `RUNNING`.

### RUNNING

    public static final Service.State RUNNING

  A service in this state is operational.

### STOPPING

    public static final Service.State STOPPING

  A service in this state is transitioning to `TERMINATED`.

### TERMINATED

    public static final Service.State TERMINATED

  A service in this state has completed execution normally. It does minimal work and consumes minimal resources.

### FAILED

    public 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

### values

    public 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

### valueOf

    public static Service.State valueOf(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:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2010-2011. All Rights Reserved.