Top Description Methods
rx

public Interface Observer<T>

Known Direct Subinterfaces
rx.observers.AssertableSubscriber, rx.Emitter
Known Direct Implementers
rx.Subscriber, rx.internal.operators.CachedObservable.CacheState, rx.internal.operators.OperatorOnBackpressureLatest.LatestEmitter, rx.internal.operators.OnSubscribePublishMulticast, rx.internal.operators.OperatorScan.InitialProducer, rx.internal.producers.ProducerObserverArbiter, rx.internal.producers.QueuedProducer, rx.internal.util.ActionNotificationObserver, rx.internal.util.ActionObserver, rx.observables.AsyncOnSubscribe.AsyncOuterManager, rx.observables.AsyncOnSubscribe.UnicastSubject, rx.observables.SyncOnSubscribe.SubscriptionProducer, rx.observers.SerializedObserver, rx.observers.TestObserver, rx.subjects.PublishSubject.PublishSubjectState, rx.subjects.PublishSubject.PublishSubjectProducer, rx.subjects.ReplaySubject.ReplayState, rx.subjects.Subject, rx.subjects.SubjectSubscriptionManager.SubjectObserver, rx.subjects.UnicastSubject.State
Type Parameters
<T>
the type of item the Observer expects to observe

Provides a mechanism for receiving push-based notifications.

After an Observer calls an Observable's subscribe method, the Observable calls the Observer's onNext method to provide notifications. A well-behaved Observable will call an Observer's onCompleted method exactly once or the Observer's onError method exactly once.

See Also
ReactiveX documentation: Observable

Method Summary

Modifier and TypeMethod and Description
public void
onCompleted()

Notifies the Observer that the Observable has finished sending push-based notifications.

public void
onError(Throwable
the exception encountered by the Observable
e
)

Notifies the Observer that the Observable has experienced an error condition.

public void
onNext(T
the item emitted by the Observable
t
)

Provides the Observer with a new item to observe.

Method Detail

onCompletedback to summary
public void onCompleted()

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

onErrorback to summary
public void onError(Throwable e)

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

onNextback to summary
public void onNext(T t)

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 onCompleted or onError.

Parameters
t:T

the item emitted by the Observable