public interface IATask<R>
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel pending computation.
|
IAResult<R> |
get()
Blocks until computation has finished and returns it's result.
|
boolean |
isCancelled()
Returns true if this computation has already been canceled.
|
void |
setCallback(IAResultCallback<R> callback,
android.os.Looper looper)
Register a callback that's
IAResultCallback.onResult(IAResult) gets invoked once
computation has completed. |
void cancel()
boolean isCancelled()
void setCallback(IAResultCallback<R> callback, android.os.Looper looper)
IAResultCallback.onResult(IAResult)
gets invoked once
computation has completed.callback
- object to invoke when computation has completedlooper
- optional looper whose message queue will be used to implement the callback
mechanism or null to make callback in the calling thread