Interface SingleObserver<T>

    • Method Detail

      • onSubscribe

        void onSubscribe​(@NonNull
                         @NonNull Disposable d)
        Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
        Parameters:
        d - the Disposable instance whose Disposable.dispose() can be called anytime to cancel the connection
        Since:
        2.0
      • onError

        void onError​(@NonNull
                     @NonNull java.lang.Throwable e)
        Notifies the SingleObserver that the Single has experienced an error condition.

        If the Single calls this method, it will not thereafter call onSuccess(T).

        Parameters:
        e - the exception encountered by the Single