Package 

Class ReturnOnErrorCall

  • All Implemented Interfaces:
    io.getstream.chat.android.client.call.Call

    
    public final class ReturnOnErrorCall<T extends Object>
     implements Call<T>
                        

    A wrapper around Call that swallows the error and emits new data from onErrorReturn.

    • Method Summary

      Modifier and Type Method Description
      Result<T> execute() Executes the call synchronously, in a blocking way.
      Unit enqueue(Call.Callback<T> callback) Executes the call asynchronously, on a background thread.
      Unit cancel() Cancels the execution of the call, if cancellation is supported for the operation.
      • Methods inherited from class io.getstream.chat.android.client.call.ReturnOnErrorCall

        enqueue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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)

        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.

      • cancel

         Unit cancel()

        Cancels the execution of the call, if cancellation is supported for the operation.

        Note that calls can not be cancelled when running them with execute.