public static enum GlobalStreamThread.State extends java.lang.Enum<GlobalStreamThread.State> implements ThreadStateTransitionValidator
+-------------+ +<--- | Created (0) | | +-----+-------+ | | | v | +-----+-------+ +<--- | Running (1) | | +-----+-------+ | | | v | +-----+-------+ +---> | Pending | | Shutdown (2)| +-----+-------+ | v +-----+-------+ | Dead (3) | +-------------+Note the following:
Enum Constant and Description |
---|
CREATED |
DEAD |
PENDING_SHUTDOWN |
RUNNING |
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
boolean |
isValidTransition(ThreadStateTransitionValidator newState) |
static GlobalStreamThread.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GlobalStreamThread.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GlobalStreamThread.State CREATED
public static final GlobalStreamThread.State RUNNING
public static final GlobalStreamThread.State PENDING_SHUTDOWN
public static final GlobalStreamThread.State DEAD
public static GlobalStreamThread.State[] values()
for (GlobalStreamThread.State c : GlobalStreamThread.State.values()) System.out.println(c);
public static GlobalStreamThread.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isRunning()
public boolean isValidTransition(ThreadStateTransitionValidator newState)
isValidTransition
in interface ThreadStateTransitionValidator