Class FlowableSingleStageSubscriber<T>

  • Type Parameters:
    T - the element type
    All Implemented Interfaces:
    FlowableSubscriber<T>, java.util.concurrent.CompletionStage<T>, java.util.concurrent.Future<T>, org.reactivestreams.Subscriber<T>

    public final class FlowableSingleStageSubscriber<T>
    extends FlowableStageSubscriber<T>
    Signals the only element of the source via the underlying CompletableFuture, signals the a default item if the upstream is empty or signals IllegalArgumentException if the upstream has more than one item.
    Since:
    3.0.0
    • Nested Class Summary

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

        java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void afterSubscribe​(org.reactivestreams.Subscription s)  
      void onComplete()  
      void onNext​(T t)  
      • Methods inherited from class java.util.concurrent.CompletableFuture

        acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, 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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • hasDefault

        final boolean hasDefault
      • defaultItem

        final T defaultItem
    • Constructor Detail

      • FlowableSingleStageSubscriber

        public FlowableSingleStageSubscriber​(boolean hasDefault,
                                             T defaultItem)
    • Method Detail

      • onNext

        public void onNext​(T t)
      • onComplete

        public void onComplete()