Class FlowableFirstStageSubscriber<T>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<T>
-
- io.reactivex.rxjava3.internal.jdk8.FlowableStageSubscriber<T>
-
- io.reactivex.rxjava3.internal.jdk8.FlowableFirstStageSubscriber<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 FlowableFirstStageSubscriber<T> extends FlowableStageSubscriber<T>
Signals the first element of the source via the underlying CompletableFuture, signals the a default item if the upstream is empty or signalsNoSuchElementException
.- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description (package private) T
defaultItem
(package private) boolean
hasDefault
-
Fields inherited from class io.reactivex.rxjava3.internal.jdk8.FlowableStageSubscriber
upstream, value
-
-
Constructor Summary
Constructors Constructor Description FlowableFirstStageSubscriber(boolean hasDefault, T defaultItem)
-
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 io.reactivex.rxjava3.internal.jdk8.FlowableStageSubscriber
cancel, cancelUpstream, clear, complete, completeExceptionally, onError, onSubscribe
-
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
-
-
-
-
Field Detail
-
hasDefault
final boolean hasDefault
-
defaultItem
final T defaultItem
-
-
Constructor Detail
-
FlowableFirstStageSubscriber
public FlowableFirstStageSubscriber(boolean hasDefault, T defaultItem)
-
-
Method Detail
-
onNext
public void onNext(T t)
-
onComplete
public void onComplete()
-
afterSubscribe
protected void afterSubscribe(org.reactivestreams.Subscription s)
- Specified by:
afterSubscribe
in classFlowableStageSubscriber<T>
-
-