Class FlowableStageSubscriber<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
io.reactivex.rxjava3.internal.jdk8.FlowableStageSubscriber<T>
- Type Parameters:
T
- the element type
- All Implemented Interfaces:
FlowableSubscriber<T>
,CompletionStage<T>
,Future<T>
,org.reactivestreams.Subscriber<T>
- Direct Known Subclasses:
FlowableFirstStageSubscriber
,FlowableLastStageSubscriber
,FlowableSingleStageSubscriber
abstract class FlowableStageSubscriber<T>
extends CompletableFuture<T>
implements FlowableSubscriber<T>
Base class that extends CompletableFuture and provides basic infrastructure
to notify watchers upon upstream signals.
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicReference
<org.reactivestreams.Subscription> (package private) T
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
afterSubscribe
(org.reactivestreams.Subscription s) final boolean
cancel
(boolean mayInterruptIfRunning) protected final void
protected final void
clear()
final boolean
final boolean
final void
final void
onSubscribe
(@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 java.util.concurrent.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.reactivestreams.Subscriber
onComplete, onNext
-
Field Details
-
upstream
-
value
T value
-
-
Constructor Details
-
FlowableStageSubscriber
FlowableStageSubscriber()
-
-
Method Details
-
onSubscribe
Description copied from interface:FlowableSubscriber
Implementors 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:
onSubscribe
in interfaceFlowableSubscriber<T>
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<T>
-
afterSubscribe
protected abstract void afterSubscribe(org.reactivestreams.Subscription s) -
onError
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-
cancelUpstream
protected final void cancelUpstream() -
clear
protected final void clear() -
cancel
public final boolean cancel(boolean mayInterruptIfRunning) -
complete
- Overrides:
complete
in classCompletableFuture<T>
-
completeExceptionally
- Overrides:
completeExceptionally
in classCompletableFuture<T>
-