public interface IProgressMonitor
IProgressMonitor interface is implemented
by objects that monitor the progress of a external process;
the methods in this interface are invoked by code that performs the external
process handling.
A request to cancel the external process can be signaled using the
setCanceled method. Operations taking a progress monitor are
expected to poll the monitor (using isCanceled) periodically and
abort at their earliest convenience. Operation can however choose to ignore
cancelation requests.
Since notification is synchronous with the external process itself, the listener should provide a fast and robust implementation. If the handling of notifications would involve blocking operations, or operations which might throw uncaught exceptions, the notifications should be queued, and the actual processing deferred (or perhaps delegated to a separate thread).
Clients may implement this interface.
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Notifies that the processing is beginning.
|
void |
done()
Notifies that the work is done; that is, either the external process is
completed or the user canceled it.
|
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested.
|
void |
setCanceled(boolean value)
Sets the cancel state to the given value.
|
void |
worked()
Notifies that some work of the external process has been completed.
|
void begin()
void done()
boolean isCanceled()
true if cancellation has been requested,
and false otherwisesetCanceled(boolean)void setCanceled(boolean value)
value - true indicates that cancelation has
been requested (but not necessarily acknowledged);
false clears this flagisCanceled()void worked()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}