public interface IOperationDelegate
IOperationDelegate
is used as a delegate for
IOperation
's. The user is allowed to provide any number of
IOperationDelegate
's for a specific IOperation
. To
register the delegate, use the
IOperation.addOperationDelegate(IOperationDelegate)
.
final IOperation operation = ...; final IOperationDelegate delegate = ...; operation.addOperationDelegate(delegate);Use the
IOperation.removeOperationDelegate(IOperationDelegate)
method
to remove delegates from a desired IOperation
.Modifier and Type | Method and Description |
---|---|
void |
onOperationFailed(IOperation operation)
Notifies this listener that the watched
IOperation failed. |
void |
onOperationFinished(IOperation operation)
Notifies this listener that the watched
IOperation finished. |
void onOperationFailed(IOperation operation)
IOperation
failed. This
only indicates an exception during the execution and is independent from
the operation's result code.operation
- The watched IOperation
.void onOperationFinished(IOperation operation)
IOperation
finished. IOperation.getResultCode()
to validate the success of the
operation. E.g. for a remote operation:
switch (operation.getResultCode()) { caseHttpConnection.HTTP_OK
: break; caseHttpConnection.HTTP_FORBIDDEN
: break; }
operation
- The watched IOperation
.