public class WorkerStateEvent extends Event
Task
and Service
support listening to state events.Modifier and Type | Field and Description |
---|---|
static EventType<WorkerStateEvent> |
ANY
Common supertype for all worker state event types.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_CANCELLED
This event occurs when the state of a Worker implementation has
transitioned to the CANCELLED state.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_FAILED
This event occurs when the state of a Worker implementation has
transitioned to the FAILED state.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_READY
This event occurs when the state of a Worker implementation has
transitioned to the READY state.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_RUNNING
This event occurs when the state of a Worker implementation has
transitioned to the RUNNING state.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_SCHEDULED
This event occurs when the state of a Worker implementation has
transitioned to the SCHEDULED state.
|
static EventType<WorkerStateEvent> |
WORKER_STATE_SUCCEEDED
This event occurs when the state of a Worker implementation has
transitioned to the SUCCEEDED state.
|
consumed, eventType, NULL_SOURCE_TARGET, target
source
Constructor and Description |
---|
WorkerStateEvent(Worker worker,
EventType<? extends WorkerStateEvent> eventType)
Create a new WorkerStateEvent.
|
Modifier and Type | Method and Description |
---|---|
Worker |
getSource()
The Worker on which the Event initially occurred.
|
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
toString
public static final EventType<WorkerStateEvent> ANY
public static final EventType<WorkerStateEvent> WORKER_STATE_READY
public static final EventType<WorkerStateEvent> WORKER_STATE_SCHEDULED
public static final EventType<WorkerStateEvent> WORKER_STATE_RUNNING
public static final EventType<WorkerStateEvent> WORKER_STATE_SUCCEEDED
public static final EventType<WorkerStateEvent> WORKER_STATE_CANCELLED
public static final EventType<WorkerStateEvent> WORKER_STATE_FAILED
public WorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType)
worker
- The Worker which is firing the event. The Worker really
should be an EventTarget, otherwise the EventTarget
for the event will be null.eventType
- The type of event. This should not be null.public Worker getSource()
getSource
in class EventObject
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.