public static enum EventThread.RunState extends Enum<EventThread.RunState>
EventThread has seven distinct states:
NOT_STARTED: The EventThread was
instantiated but not yet started.
STARTING: An EventThread is
instantiated and start() is executing
but not yet completed.
RUNNING: An EventThread instance was
started but EventThread.halt(boolean) or EventThread.haltNow(boolean) have not
yet been called.
HALT_DRAIN: EventThread.halt(boolean) was called and the
the EventThread is processing existing
enqueued events. No new events may be added.
HALT_NOW: EventThread.haltNow(boolean) was called; all
enqueued events are ignored.
STOPPING: An EventThread has exited
the event processing thread and called the
stopping method.
HALTED: An EventThread has exited
its run method.
| Enum Constant and Description |
|---|
HALT_DRAIN
The thread is waiting for the queue to drain
before halting.
|
HALT_NOW
The thread is stopping now.
|
HALTED
The event thread has completed its clean up
performed by the
stopping method and is
no longer running. |
NOT_STARTED
The event thread is not yet started.
|
RUNNING
The thread is processing events.
|
STARTING
The event thread is calling the subclass starting()
method.
|
STOPPING
The event thread has stopped processing the event
queue and has passed control to the subclass
stopping method. |
| Modifier and Type | Method and Description |
|---|---|
static EventThread.RunState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EventThread.RunState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EventThread.RunState NOT_STARTED
public static final EventThread.RunState STARTING
public static final EventThread.RunState RUNNING
public static final EventThread.RunState HALT_DRAIN
public static final EventThread.RunState HALT_NOW
public static final EventThread.RunState STOPPING
stopping method.public static final EventThread.RunState HALTED
stopping method and is
no longer running. This thread may not be
restarted.public static EventThread.RunState[] values()
for (EventThread.RunState c : EventThread.RunState.values()) System.out.println(c);
public static EventThread.RunState 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 nullCopyright © 2019. All rights reserved.