Package aQute.bnd.service.progress
Interface ProgressPlugin.Task
-
- Enclosing interface:
- ProgressPlugin
@ProviderType public static interface ProgressPlugin.Task
Represents an ongoing task.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
abort()
Cancel this task.void
done(java.lang.String message, java.lang.Throwable e)
The task has been completed; optionally with a message and/or exception to indicate the outcome.boolean
isCanceled()
Check if this task is canceled.void
worked(int units)
The specified number of units out of the total have been worked.
-
-
-
Method Detail
-
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
void done(java.lang.String message, java.lang.Throwable e)
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
-
-