T- the type of item the MaybeObserver expects to observe
public interface MaybeObserver<T>
After a MaybeObserver calls a
first the Maybe calls
onSubscribe(Disposable) with a
Disposable that allows
cancelling the sequence at any time, then the
Maybe calls only one of the MaybeObserver's
onComplete() methods to provide notifications.
|Modifier and Type||Method and Description|
Called once the deferred computation completes normally.
Notifies the MaybeObserver that the
Provides the MaybeObserver with the means of cancelling (disposing) the connection (channel) with the Maybe in both synchronous (from within
Notifies the MaybeObserver with one item and that the
void onSubscribe(@NonNull Disposable d)
onSubscribe(Disposable)itself) and asynchronous manner.
d- the Disposable instance whose
Disposable.dispose()can be called anytime to cancel the connection
Maybehas finished sending push-based notifications.
t- the item emitted by the Maybe
void onError(@NonNull java.lang.Throwable e)
Maybehas experienced an error condition.
e- the exception encountered by the Maybe