-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCall.Callback
-
Method Summary
Modifier and Type Method Description abstract Result<T>execute()Executes the call synchronously, in a blocking way. Unitenqueue(Function1<Result<T>, Unit> callback)Executes the call asynchronously, on a background thread. abstract Unitenqueue(Call.Callback<T> callback)Executes the call asynchronously, on a background thread. Unitenqueue()Executes the call asynchronously, on a background thread. abstract Unitcancel()Cancels the execution of the call, if cancellation is supported for the operation. -
-
Method Detail
-
execute
@WorkerThread() abstract Result<T> execute()
Executes the call synchronously, in a blocking way. Only call this from a background thread.
-
enqueue
@Deprecated(level = DeprecationLevel.ERROR, message = "Use the enqueue method with a Callback<T> parameter instead")@SinceKotlin(version = "99999.9") Unit enqueue(Function1<Result<T>, Unit> callback)
Executes the call asynchronously, on a background thread. Safe to call from the main thread. The callback will always be invoked on the main thread.
-
enqueue
abstract Unit enqueue(Call.Callback<T> callback)
Executes the call asynchronously, on a background thread. Safe to call from the main thread. The callback will always be invoked on the main thread.
-
enqueue
Unit enqueue()
Executes the call asynchronously, on a background thread. Safe to call from the main thread.
To get notified of the result and handle errors, use enqueue(callback) instead.
-
-
-
-