Top Description Fields Constructors Methods
io.reactivex.rxjava3.internal.jdk8

pack-priv abstract Class FlowableStageSubscriber<T>

extends CompletableFuture<T>
implements FlowableSubscriber<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.core.FlowableSubscriber, org.reactivestreams.Subscriber
Known Direct Subclasses
io.reactivex.rxjava3.internal.jdk8.FlowableFirstStageSubscriber, io.reactivex.rxjava3.internal.jdk8.FlowableLastStageSubscriber, io.reactivex.rxjava3.internal.jdk8.FlowableSingleStageSubscriber
Type Parameters
<T>
the element type
Imports
java.util.concurrent.CompletableFuture, java.util.concurrent.atomic.AtomicReference, org.reactivestreams.Subscription, io.reactivex.rxjava3.annotations.NonNull, io.reactivex.rxjava3.core.FlowableSubscriber, io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper, io.reactivex.rxjava3.plugins.RxJavaPlugins

Base class that extends CompletableFuture and provides basic infrastructure to notify watchers upon upstream signals.
Since
3.0.0

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicReference<Subscription>
pack-priv T

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected abstract void
public final boolean
cancel(boolean
this value has no effect in this implementation because interrupts are not used to control processing.
mayInterruptIfRunning
)

Overrides java.util.concurrent.CompletableFuture.cancel.

Implements java.util.concurrent.Future.cancel.

If not already completed, completes this CompletableFuture with a CancellationException.
protected final void
protected final void
public final boolean
complete(T
the result value
value
)

Overrides java.util.concurrent.CompletableFuture.complete.

If not already completed, sets the value returned by get() and related methods to the given value.
public final boolean
completeExceptionally(Throwable
the exception
ex
)

Overrides java.util.concurrent.CompletableFuture.completeExceptionally.

If not already completed, causes invocations of get() and related methods to throw the given exception.
public final void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public final void
Inherited from java.util.concurrent.CompletableFuture:
acceptEitheracceptEitherAsyncacceptEitherAsyncallOfanyOfapplyToEitherapplyToEitherAsyncapplyToEitherAsynccompleteAsynccompleteAsynccompletedFuturecompletedStagecompleteOnTimeoutcopydefaultExecutordelayedExecutordelayedExecutorexceptionallyexceptionallyAsyncexceptionallyAsyncexceptionallyComposeexceptionallyComposeAsyncexceptionallyComposeAsyncexceptionNowfailedFuturefailedStagegetgetgetNowgetNumberOfDependentshandlehandleAsynchandleAsyncisCancelledisCompletedExceptionallyisDonejoinminimalCompletionStagenewIncompleteFutureobtrudeExceptionobtrudeValueorTimeoutresultNowrunAfterBothrunAfterBothAsyncrunAfterBothAsyncrunAfterEitherrunAfterEitherAsyncrunAfterEitherAsyncrunAsyncrunAsyncstatesupplyAsyncsupplyAsyncthenAcceptthenAcceptAsyncthenAcceptAsyncthenAcceptBoththenAcceptBothAsyncthenAcceptBothAsyncthenApplythenApplyAsyncthenApplyAsyncthenCombinethenCombineAsyncthenCombineAsyncthenComposethenComposeAsyncthenComposeAsyncthenRunthenRunAsyncthenRunAsynctoCompletableFuturetoStringwhenCompletewhenCompleteAsyncwhenCompleteAsync

Field Detail

upstreamback to summary
pack-priv final AtomicReference<Subscription> upstream
valueback to summary
pack-priv T value

Constructor Detail

FlowableStageSubscriberback to summary
pack-priv FlowableStageSubscriber()

Method Detail

afterSubscribeback to summary
protected abstract void afterSubscribe(Subscription s)
cancelback to summary
public final boolean cancel(boolean mayInterruptIfRunning)

Overrides java.util.concurrent.CompletableFuture.cancel.

Implements java.util.concurrent.Future.cancel.

Doc from java.util.concurrent.CompletableFuture.cancel.

If not already completed, completes this CompletableFuture with a CancellationException. Dependent CompletableFutures that have not already completed will also complete exceptionally, with a CompletionException caused by this CancellationException.

Parameters
mayInterruptIfRunning:boolean

this value has no effect in this implementation because interrupts are not used to control processing.

Returns:boolean

true if this task is now cancelled

Annotations
@Override
cancelUpstreamback to summary
protected final void cancelUpstream()
clearback to summary
protected final void clear()
completeback to summary
public final boolean complete(T value)

Overrides java.util.concurrent.CompletableFuture.complete.

Doc from java.util.concurrent.CompletableFuture.complete.

If not already completed, sets the value returned by get() and related methods to the given value.

Parameters
value:T

the result value

Returns:boolean

true if this invocation caused this CompletableFuture to transition to a completed state, else false

Annotations
@Override
completeExceptionallyback to summary
public final boolean completeExceptionally(Throwable ex)

Overrides java.util.concurrent.CompletableFuture.completeExceptionally.

Doc from java.util.concurrent.CompletableFuture.completeExceptionally.

If not already completed, causes invocations of get() and related methods to throw the given exception.

Parameters
ex:Throwable

the exception

Returns:boolean

true if this invocation caused this CompletableFuture to transition to a completed state, else false

Annotations
@Override
onErrorback to summary
public final void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onSubscribeback to summary
public final void onSubscribe(@NonNull Subscription s)

Implements org.reactivestreams.Subscriber.onSubscribe.

Doc from org.reactivestreams.Subscriber.onSubscribe.

Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:@NonNull Subscription

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override