Class FlowableFirstStageSubscriber<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
io.reactivex.rxjava3.internal.jdk8.FlowableFirstStageSubscriber<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
FlowableSubscriber<T>, CompletionStage<T>, Future<T>, org.reactivestreams.Subscriber<T>
Signals the first element of the source via the underlying CompletableFuture,
signals the a default item if the upstream is empty or signals
NoSuchElementException.- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterSubscribe(org.reactivestreams.Subscription s) final booleancancel(boolean mayInterruptIfRunning) protected final voidprotected final voidclear()final booleanfinal booleanvoidfinal voidvoidfinal voidonSubscribe(@NonNull org.reactivestreams.Subscription s) Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)is established before callingSubscription.request(long).Methods inherited from class CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, 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
-
Constructor Details
-
FlowableFirstStageSubscriber
-
-
Method Details
-
onNext
-
onComplete
public void onComplete() -
afterSubscribe
protected void afterSubscribe(org.reactivestreams.Subscription s) -
onSubscribe
Description copied from interface:FlowableSubscriberImplementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)is established before callingSubscription.request(long). In practice this means no initialization should happen after therequest()call and additional behavior is thread safe in respect toonNext.- Specified by:
onSubscribein interfaceFlowableSubscriber<T>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<T>
-
cancelUpstream
protected final void cancelUpstream() -
clear
protected final void clear() -
cancel
public final boolean cancel(boolean mayInterruptIfRunning) - Specified by:
cancelin interfaceFuture<T>- Overrides:
cancelin classCompletableFuture<T>
-
complete
- Overrides:
completein classCompletableFuture<T>
-
completeExceptionally
- Overrides:
completeExceptionallyin classCompletableFuture<T>
-