public interface IListenableFuture<ResultType> extends IFuture<ResultType>
IProgressRunnable (with optional
IProgressMonitor) to be executed via an IExecutor.| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IExecutor executor,
IProgressRunnable<ResultType> progressRunnable,
IProgressMonitor monitor)
Add an
IProgressRunnable that will be called back/run once the
asynchronous execution is complete. |
void addListener(IExecutor executor, IProgressRunnable<ResultType> progressRunnable, IProgressMonitor monitor)
IProgressRunnable that will be called back/run once the
asynchronous execution is complete. The IProgressRunnable must be
non-null and the IExecutor must also be non-
null. The given progressMonitor may be null.
If the future has already completed by the time this method is called
(i.e. IFuture.isDone() returns true, the progressRunnable
will be executed immediately by the given executor.
executor - the IExecutor to use to execute the given
IProgressRunnable. Must not be null.progressRunnable - the IProgressRunnable that will be executed when this
future is complete. Must not be null.monitor - an optional progress monitor to be passed to the
progressRunnable when executed. May be null.