Package aQute.bnd.service.progress
Interface ProgressPlugin.Task
- Enclosing interface:
- ProgressPlugin
@ProviderType
public static interface ProgressPlugin.Task
Represents an ongoing task.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
abort()
Cancel this task.void
The task has been completed; optionally with a message and/or exception to indicate the outcome.boolean
Check if this task is canceled.void
worked
(int units) The specified number of units out of the total have been worked.
-
Method Details
-
worked
void worked(int units) The specified number of units out of the total have been worked. If called afterdone()
, anIllegalStateException
may be thrown.- Parameters:
units
-
-
done
The task has been completed; optionally with a message and/or exception to indicate the outcome. After calling this method, no more work should be performed in the task.- Parameters:
message
- A message associated with the completion of the task; may be null.e
- An exception thrown by the task; may be null;
-
isCanceled
boolean isCanceled()Check if this task is canceled. -
abort
default void abort()Cancel this task. This might not be implemented
-