T
- The message type of the upstream observable and downstream observerpublic class MultiplePassthroughObserver<T> extends java.lang.Object implements Observer<T>
passive
observables
.
A passive observable is one which does not maintain a set of observations or manage its own events, instead deferring to one or more upstream observables. When an observer subscribes to a passive observable, typically the observer is decorated, and the decorator is then subscribed to the parents. This way the decorator can modify, inspect, or filter events as appropriate before passing them back through to the original observer.
This class is a partial implementation of such a decorator.
Constructor and Description |
---|
MultiplePassthroughObserver(java.util.Collection<Observer<? super T>> downstreamObservers) |
MultiplePassthroughObserver(Observer<? super T>... downstreamObservers) |
Modifier and Type | Method and Description |
---|---|
void |
onComplete() |
void |
onFail(java.lang.Throwable t) |
void |
onNext(T message)
The method which will receive notification from an
Observable . |
void |
onObserve(Observation observation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onCompletion, onFailure, onObservation, singleUse
@SafeVarargs public MultiplePassthroughObserver(Observer<? super T>... downstreamObservers)
public void onObserve(Observation observation)
public void onNext(T message)
Observer
Observable
.public void onComplete()
onComplete
in interface Observer<T>