Class ObservableStageObserver<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
io.reactivex.rxjava3.internal.jdk8.ObservableStageObserver<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Observer<T>, CompletionStage<T>, Future<T>
- Direct Known Subclasses:
ObservableFirstStageObserver, ObservableLastStageObserver, ObservableSingleStageObserver
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 CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface Future
Future.State -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicReference<Disposable> (package private) T -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancancel(boolean mayInterruptIfRunning) protected final voidclear()final booleanfinal booleanprotected final voidfinal voidNotifies theObserverthat theObservablehas experienced an error condition.final voidProvides theObserverwith the means of cancelling (disposing) the connection (channel) with theObservablein both synchronous (from withinObserver.onNext(Object)) and asynchronous manner.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, whenCompleteAsyncMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Observer
onComplete, onNext
-
Field Details
-
upstream
-
value
T value
-
-
Constructor Details
-
ObservableStageObserver
ObservableStageObserver()
-
-
Method Details
-
onSubscribe
Description copied from interface:ObserverProvides theObserverwith the means of cancelling (disposing) the connection (channel) with theObservablein both synchronous (from withinObserver.onNext(Object)) and asynchronous manner.- Specified by:
onSubscribein interfaceObserver<T>- Parameters:
d- theDisposableinstance whoseDisposable.dispose()can be called anytime to cancel the connection
-
onError
Description copied from interface:ObserverNotifies theObserverthat theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onComplete(). -
disposeUpstream
protected final void disposeUpstream() -
clear
protected final void clear() -
cancel
-
complete
- Overrides:
completein classCompletableFuture<T>
-
completeExceptionally
- Overrides:
completeExceptionallyin classCompletableFuture<T>
-