ResultCallback

interface ResultCallback<R : Result?>

Known direct subclasses
ResultCallbacks

Callbacks for receiving a Result from a as an asynchronous callback.

Known indirect subclasses
ResolvingResultCallbacks

ResultCallbacks which automatically start resolutions for failures.


An interface for receiving a Result from a as an asynchronous callback.

See also ResultCallbacks and ResolvingResultCallbacks.

Summary

Public functions

Unit
onResult(result: R)

Called when the Result is ready.

Public functions

onResult

fun onResult(result: R): Unit

Called when the Result is ready.

It is the responsibility of the callback to release any resources associated with the result. Some result types may implement Releasable, in which case release should be used to free the associated resources.

This method is called on the main thread, unless overridden by setHandler.

Parameters
result: R

The result from the API call. Never null.