| io.reactivex.Observer<T> |
Known Indirect Subclasses
AsyncSubject<T>,
BehaviorSubject<T>,
DefaultObserver<T>,
DisposableObserver<T>,
PublishSubject<T>,
ReplaySubject<T>,
ResourceObserver<T>,
SafeObserver<T>,
SerializedObserver<T>,
Subject<T>,
TestObserver<T>,
UnicastSubject<T>
|
Provides a mechanism for receiving push-based notifications.
After an Observer calls an Observable's subscribe method,
first the Observable calls onSubscribe(Disposable) with a Disposable that allows
cancelling the sequence at any time, then the
Observable may call the Observer's onNext(T) method any number of times
to provide notifications. A well-behaved
Observable will call an Observer's onComplete() method exactly once or the Observer's
onError(Throwable) method exactly once.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
onComplete()
Notifies the Observer that the
Observable has finished sending push-based notifications. | ||||||||||
| abstract void |
onError(Throwable e)
Notifies the Observer that the
Observable has experienced an error condition. | ||||||||||
| abstract void |
onNext(T t)
Provides the Observer with a new item to observe.
| ||||||||||
| abstract void |
onSubscribe(Disposable d)
Provides the Observer with the means of cancelling (disposing) the
connection (channel) with the Observable in both
synchronous (from within
onNext(Object)) and asynchronous manner. | ||||||||||
Notifies the Observer that the Observable has finished sending push-based notifications.
The Observable will not call this method if it calls onError(Throwable).
Notifies the Observer that the Observable has experienced an error condition.
If the Observable calls this method, it will not thereafter call onNext(T) or
onComplete().
| e | the exception encountered by the Observable |
|---|
Provides the Observer with a new item to observe.
The Observable may call this method 0 or more times.
The Observable will not call this method again after it calls either onComplete() or
onError(Throwable).
| t | the item emitted by the Observable |
|---|
Provides the Observer with the means of cancelling (disposing) the
connection (channel) with the Observable in both
synchronous (from within onNext(Object)) and asynchronous manner.
| d | the Disposable instance whose dispose() can
be called anytime to cancel the connection |
|---|