public interface TaskContext
Modifier and Type | Method and Description |
---|---|
void |
addListener(TaskListener listener)
Adds listener that receives events for this execution only.
|
void |
firePhaseChangeEvent(String oldValue,
String newValue) |
void |
fireProgressChangeEvent(Integer oldValue,
Integer newValue) |
void |
fireStateChangeEvent(Task.State oldValue,
Task.State newValue) |
String |
getContextId()
The context id is generated on each task execution and
is (at least) unique among all executions in this application
run.
|
Long |
getDuration() |
Long |
getFinishTimestamp() |
String |
getPhase() |
int |
getProgress() |
Long |
getStartedTimestamp() |
Task.State |
getState() |
Task |
getTask() |
<V,C> TaskWorker<V,C> |
getWorker() |
void |
removeListener(TaskListener listener) |
String getContextId()
Task getTask()
Long getStartedTimestamp()
Long getFinishTimestamp()
Task.State getState()
int getProgress()
String getPhase()
Long getDuration()
void addListener(TaskListener listener)
TaskListenerSupport
to add more global listeners.listener
- void removeListener(TaskListener listener)
<V,C> TaskWorker<V,C> getWorker()
void fireStateChangeEvent(Task.State oldValue, Task.State newValue)