java.lang.Object | |
↳ | com.urbanairship.PendingResult<T> |
A pending result.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PendingResult() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PendingResult<T> |
addCancelable(Cancelable cancelable)
Adds a
Cancelable that will be called when
the pending result is canceled. | ||||||||||
PendingResult<T> |
addResultCallback(Looper looper, ResultCallback<T> resultCallback)
Adds a result callback.
| ||||||||||
PendingResult<T> |
addResultCallback(ResultCallback<T> resultCallback)
Adds a result callback.
| ||||||||||
final boolean |
cancel()
Cancels the operation.
| ||||||||||
boolean |
cancel(boolean mayInterruptIfRunning)
Cancels the operation.
| ||||||||||
T | get(long l, TimeUnit timeUnit) | ||||||||||
T | get() | ||||||||||
T |
getResult()
Returns the result if set.
| ||||||||||
boolean |
isCancelled()
Determines if the operation is canceled.
| ||||||||||
boolean |
isDone()
Determines if the operation is canceled or completed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.urbanairship.Cancelable
| |||||||||||
From interface
java.util.concurrent.Future
|
Adds a Cancelable
that will be called when
the pending result is canceled. If the pending result is already canceled the operation
will immediately be canceled.
cancelable | The instance that implements the Cancelable interface.
|
---|
Adds a result callback.
looper | The looper to run the callback on. |
---|---|
resultCallback | The result callback. |
Adds a result callback.
resultCallback | The result callback. |
---|
Cancels the operation.
false
if the cancelable was able to be cancelled, otherwise true
.
Cancels the operation.
mayInterruptIfRunning | true if the thread executing this task should be interrupted; otherwise, in-progress tasks are allowed to complete. |
---|
false
if the cancelable was able to be cancelled, otherwise true
.
Returns the result if set.
null
.
Determines if the operation is canceled.
true
if canceled, otherwise false
Determines if the operation is canceled or completed.
true
if canceled or completed, otherwise false