io.reactivex.SingleObserver<T> |
![]() |
Provides a mechanism for receiving push-based notifications.
After a SingleObserver calls a Single
's subscribe
method,
first the Single calls onSubscribe(Disposable)
with a Disposable
that allows
cancelling the sequence at any time, then the
Single
calls only one of the SingleObserver onSuccess(T)
and onError(Throwable)
methods to provide
notifications.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
onError(Throwable e)
Notifies the SingleObserver that the
Single has experienced an error condition. | ||||||||||
abstract void |
onSubscribe(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. | ||||||||||
abstract void |
onSuccess(T t)
Notifies the SingleObserver with a single item and that the
Single has finished sending
push-based notifications. |
Notifies the SingleObserver that the Single
has experienced an error condition.
If the Single
calls this method, it will not thereafter call onSuccess(T)
.
e | the exception encountered by the Single |
---|
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.
d | the Disposable instance whose dispose() can
be called anytime to cancel the connection |
---|
Notifies the SingleObserver with a single item and that the Single
has finished sending
push-based notifications.
The Single
will not call this method if it calls onError(Throwable)
.
t | the item emitted by the Single |
---|