Interface TaskHandle
Interface TaskHandle
-
public interface TaskHandleHandle used for the manipulation of the task.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancancel()Sets internal state of task to 'canceled'.booleanisCancelled()Gets a boolean indicating if this task is cancelled.booleanisFinished()Gets a boolean indicating if this task is completed.
-
-
-
Method Detail
-
cancel
boolean cancel()
Sets internal state of task to 'canceled'. If the task is still in the queue, it will be removed from it immediately. However, if the task is in a running state, it will nevertheless be completed, as there is no way to interrupt it.
- Returns:
True, if the task was canceled. False, if the task can't be canceled due to a platform dependent reason.
-
isFinished
boolean isFinished()
Gets a boolean indicating if this task is completed.
True, if this task is completed. Completion may be due to normal termination, an exception, or cancellation - in all of these cases, result will return
true.- Returns:
Completion indication.
-
isCancelled
boolean isCancelled()
Gets a boolean indicating if this task is cancelled.
True, if this task was canceled before it completed normally.
- Returns:
Completion indication.
-
-