public interface TaskMonitor
Modifier and Type | Method and Description |
---|---|
void |
allowCancellationRequests()
Notifies parties that the task will accept requests for cancellation
(though the task is not obligated to cancel immediately, or at all
for that matter).
|
boolean |
isCancelRequested()
Checks whether a party has requested that the task be cancelled.
|
void |
report(java.lang.Exception exception)
Reports an Exception that occurred.
|
void |
report(int itemsDone,
int totalItems,
java.lang.String itemDescription)
Reports the number of items processed.
|
void |
report(java.lang.String description)
Describes the status of the task.
|
void report(java.lang.String description)
description
- a description of the progress of the overall taskvoid report(int itemsDone, int totalItems, java.lang.String itemDescription)
itemsDone
- the number of items that have been processedtotalItems
- the total number of items being processed, or -1 if the
total number is not knownitemDescription
- a one-word description of the items, such as "features"void report(java.lang.Exception exception)
exception
- an Exception that occurred during the execution of the task.void allowCancellationRequests()
boolean isCancelRequested()