public static enum LifeCycle.State extends Enum<LifeCycle.State>
| 枚举常量和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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)
返回带有指定名称的该类型的枚举常量。
|
static LifeCycle.State[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
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 - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public boolean isRunning()
RUNNING?public boolean isClosingOrClosed()
public boolean isPausingOrPaused()
public static boolean isValid(LifeCycle.State from, LifeCycle.State to)
Copyright © 2017–2021 The Apache Software Foundation. All rights reserved.