TResult
- the type of element signaled.public interface Observable<TResult>
Observable
represents a MongoDB operation.
As such it is a provider of a potentially unbounded number of sequenced elements, publishing them according to the demand received
from its Observer
(s).
Observables
Modifier and Type | Method and Description |
---|---|
void |
subscribe(Observer<? super TResult> observer)
Request
Observable to start streaming data. |
void subscribe(Observer<? super TResult> observer)
Observable
to start streaming data.
This is a "factory method" and can be called multiple times, each time starting a new Subscription
.
Each Subscription
will work for only a single Observer
.
If the Observable
rejects the subscription attempt or otherwise fails it will
signal the error via Observer.onError(java.lang.Throwable)
.
observer
- the Observer
that will consume signals from this Observable