Callback

interface Callback<T, U>

Generic callback interface with a generic return types.

Parameters

T

type of the returned object.

U

type of the returned exception.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard
abstract fun onError(error: U)

Called when an error occurs during processing.

Link copied to clipboard
abstract fun onSuccess(result: T)

Called when requested resource is successfully obtained.