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>
    A 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).

    See Also:
    Observables
    • Method Detail

      • subscribe

        void subscribe​(Observer<? super TResult> observer)
        Deprecated. 
        Request 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).

        Parameters:
        observer - the Observer that will consume signals from this Observable