-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.call.Call
public final class DistinctCall<T extends Object> implements Call<T>
Reusable wrapper around Call which delivers a single result to all subscribers.
-
-
Constructor Summary
Constructors Constructor Description DistinctCall(CoroutineScope scope, Function0<Call<T>> callBuilder, Function0<Unit> onFinished)
-
Method Summary
Modifier and Type Method Description final Call<T>originCall()Result<T>execute()Executes the call synchronously, in a blocking way. Unitenqueue(Call.Callback<T> callback)Executes the call asynchronously, on a background thread. Result<T>await()Awaits the result of this Call in a suspending way, asynchronously. Unitcancel()Cancels the execution of the call. -
-
Method Detail
-
originCall
final Call<T> originCall()
-
execute
Result<T> execute()
Executes the call synchronously, in a blocking way. Only call this from a background thread.
-
enqueue
Unit enqueue(Call.Callback<T> callback)
-
-
-
-