public interface IOperationQueueDelegate
IOperationQueueDelegate
is used as a delegate for
BasicOperationQueue
's. The user is allowed to provide any number of
IOperationQueueDelegate
's for a specific
BasicOperationQueue
. To register the delegate, use the
BasicOperationQueue.addDelegate(IOperationQueueDelegate)
.
final IOperationQueue queue = ...; final IOperationDelegate delegate = ...; queue.addDelegate(delegate);Use the
BasicOperationQueue.removeDelegate(IOperationQueueDelegate)
method to remove delegates from a desired IOperationQueue
.
The delegate's onQueueFailed(IOperation)
and
onQueueFinished(IOperation)
methods are executed in a worker thread
and therefore cannot update the UI. If the delegate needs to update the UI,
this needs to be done in using the
nUIController#runOnMDThread(Runnable)
method:
public void onQueueFinished(final IOperation lastOperation) { nUIController.runOnMDThread(new Runnable() { public void run() { getAppController().closeProgressWindow(); } }); }
Modifier and Type | Method and Description |
---|---|
void |
onQueueFailed(IOperation operation)
Notifies this listener that the one
IOperation in the queue failed. |
void |
onQueueFinished(IOperation lastOperation)
Notifies this listener that the queue finished, i.e.
|
void onQueueFailed(IOperation operation)
IOperation
in the queue failed.
This only indicates an exception during the execution and is independent from
the operation's result code. Furthermore the execution of other
IOperation
s continues according to the queues content.operation
- The failed IOperation
.void onQueueFinished(IOperation lastOperation)
operation
- The last IOperation
that was executed.