ResultCallbacks
public abstract class ResultCallbacks<R extends Result> implements ResultCallback
ResolvingResultCallbacks |
|
Callbacks for receiving a Result from a as an asynchronous callback. Contains separate callbacks for success and failure.
These methods are called on the main thread, unless overridden by setHandler.
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
abstract void |
Called when the |
abstract void |
Called when the |
Public constructors
Public methods
onFailure
public abstract void onFailure(@NonNull Status result)
Called when the Result is ready and a failure occurred.
onSuccess
public abstract void onSuccess(@NonNull R result)
Called when the Result is ready and was successful.
It is the responsibility of the callback to release any resources associated with the result if onSuccess is called. Some result types may implement Releasable, in which case release should be used to free the associated resources. If a failure occurs the result will be released automatically.
| Parameters | |
|---|---|
@NonNull R result |
The result from the API call. Never null. |