public static enum LifeCycle.State extends Enum<LifeCycle.State>
| Enum Constant and Description |
|---|
CLOSED
The machine is closed, a final state.
|
CLOSING
The machine is closing, stopping providing service and releasing resources.
|
EXCEPTION
The machine catches an internal exception so that it must be closed.
|
NEW
The machine is newly created and holds zero resource.
|
PAUSED
The machine is paused and does not provide any service.
|
PAUSING
The machine is pausing and stopping providing service.
|
RUNNING
The machine is running and providing service.
|
STARTING
The machine is starting and does not yet provide any service.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isClosingOrClosed()
|
boolean |
isPausingOrPaused()
|
boolean |
isRunning()
Is this
RUNNING? |
static boolean |
isValid(LifeCycle.State from,
LifeCycle.State to)
Is the given transition valid?
|
static LifeCycle.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LifeCycle.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LifeCycle.State NEW
public static final LifeCycle.State STARTING
public static final LifeCycle.State RUNNING
public static final LifeCycle.State PAUSING
public static final LifeCycle.State PAUSED
public static final LifeCycle.State EXCEPTION
public static final LifeCycle.State CLOSING
public static final LifeCycle.State CLOSED
public static LifeCycle.State[] values()
for (LifeCycle.State c : LifeCycle.State.values()) System.out.println(c);
public static LifeCycle.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 nullpublic boolean isRunning()
RUNNING?public boolean isClosingOrClosed()
public boolean isPausingOrPaused()
public static boolean isValid(LifeCycle.State from, LifeCycle.State to)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.