Package com.mongodb.async.client
Interface Observable<TResult>
-
- Type Parameters:
TResult
- the type of element signaled.
Deprecated.Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
@Deprecated public interface Observable<TResult>
AObservable
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).- See Also:
Observables
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
subscribe(Observer<? super TResult> observer)
Deprecated.RequestObservable
to start streaming data.
-
-
-
Method Detail
-
subscribe
void subscribe(Observer<? super TResult> observer)
Deprecated.RequestObservable
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 singleObserver
.If the
Observable
rejects the subscription attempt or otherwise fails it will signal the error viaObserver.onError(java.lang.Throwable)
.- Parameters:
observer
- theObserver
that will consume signals from thisObservable
-
-