com.holonplatform.datastore.mongo.async.internal

## Class CompletableFutureStreamSubscriber<T>

- java.lang.Object
- - java.util.concurrent.CompletableFuture<Stream<T>>
  - - com.holonplatform.datastore.mongo.async.internal.CompletableFutureStreamSubscriber<T>

- Type Parameters:
    `T` - Type
  All Implemented Interfaces:
    CompletionStage<Stream<T>>, Future<Stream<T>>, org.reactivestreams.Subscriber<T>

      public class CompletableFutureStreamSubscriber<T>
      extends CompletableFuture<Stream<T>>
      implements org.reactivestreams.Subscriber<T>

  A `Subscriber` adapter for `CompletableFuture` of results stream.
  Since:
    5.2.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

      `CompletableFuture.AsynchronousCompletionTask`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompletableFutureStreamSubscriber()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> CompletableFuture<Stream<T>>` | `fromPublisher(org.reactivestreams.Publisher<T> publisher)`
    `void` | `onComplete()`
    `void` | `onError(Throwable t)`
    `void` | `onNext(T t)`
    `void` | `onSubscribe(org.reactivestreams.Subscription s)`

    - ### Methods inherited from class java.util.concurrent.CompletableFuture

      `acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CompletableFutureStreamSubscriber

          public CompletableFutureStreamSubscriber()

  - ### Method Detail

    - #### onSubscribe

          public void onSubscribe(org.reactivestreams.Subscription s)

      Specified by:
        `onSubscribe` in interface `org.reactivestreams.Subscriber<T>`

    - #### onNext

          public void onNext(T t)

      Specified by:
        `onNext` in interface `org.reactivestreams.Subscriber<T>`

    - #### onError

          public void onError(Throwable t)

      Specified by:
        `onError` in interface `org.reactivestreams.Subscriber<T>`

    - #### onComplete

          public void onComplete()

      Specified by:
        `onComplete` in interface `org.reactivestreams.Subscriber<T>`

    - #### fromPublisher

          public static <T> CompletableFuture<Stream<T>> fromPublisher(org.reactivestreams.Publisher<T> publisher)

Copyright © 2019 The Holon Platform. All rights reserved.