|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncTask
A handle representing an asynchronous task that has been submitted to the message bus.
Method Summary | |
---|---|
void |
cancel(boolean interrupt)
Prevents this task from being scheduled again, optionally interrupting the task if it is currently running. |
boolean |
isCancelled()
Returns true if cancel(boolean) has been called on this task,
whether it was called from user code or from within the framework because
the task threw an exception. |
boolean |
isFinished()
Returns true if this task is no longer scheduled to run, either because it executed (successfully or with an error) or cancel(boolean) was called. |
void |
setExitHandler(Runnable runnable)
Sets the task that should be run after all executions of this task have completed. |
Method Detail |
---|
void cancel(boolean interrupt)
interrupt
- if true, and this task is presently being executed,
Thread.interrupt()
will be called on the thread currently
executing this task.void setExitHandler(Runnable runnable)
runnable
- the logic to execute when this task has completed all of its
executions, either because it completed normally, by throwing an
exception, or because it was cancelled by a call to
cancel(boolean)
.boolean isCancelled()
cancel(boolean)
has been called on this task,
whether it was called from user code or from within the framework because
the task threw an exception.
boolean isFinished()
cancel(boolean)
was called.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |