Top Description Methods
io.reactivex.rxjava3.core

public Interface CompletableObserver

Known Direct Implementers
io.reactivex.rxjava3.internal.jdk8.CompletionStageConsumer, io.reactivex.rxjava3.internal.observers.BlockingDisposableMultiObserver, io.reactivex.rxjava3.internal.observers.BlockingMultiObserver, io.reactivex.rxjava3.internal.observers.CallbackCompletableObserver, io.reactivex.rxjava3.internal.observers.DisposableAutoReleaseMultiObserver, io.reactivex.rxjava3.internal.observers.EmptyCompletableObserver, io.reactivex.rxjava3.internal.observers.FutureMultiObserver, io.reactivex.rxjava3.internal.observers.SafeCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableHide.HideCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableAmb.Amb, io.reactivex.rxjava3.internal.operators.completable.CompletableAndThenCompletable.SourceObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableAndThenCompletable.NextObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableCache, io.reactivex.rxjava3.internal.operators.completable.CompletableConcat.CompletableConcatSubscriber.ConcatInnerObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableConcatArray.ConcatInnerObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableConcatIterable.ConcatInnerObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableDelay.Delay, io.reactivex.rxjava3.internal.operators.completable.CompletableDetach.DetachCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableDisposeOn.DisposeOnObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableDoFinally.DoFinallyObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableDoOnEvent.DoOnEvent, io.reactivex.rxjava3.internal.operators.completable.CompletableMerge.CompletableMergeSubscriber.MergeInnerObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableMergeArray.InnerCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableMergeArrayDelayError.MergeInnerCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableMergeIterable.MergeCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableObserveOn.ObserveOnCompletableObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableOnErrorComplete.OnError, io.reactivex.rxjava3.internal.operators.completable.CompletableOnErrorReturn.OnErrorReturnMaybeObserver, io.reactivex.rxjava3.internal.operators.completable.CompletablePeek.CompletableObserverImplementation, io.reactivex.rxjava3.internal.operators.completable.CompletableResumeNext.ResumeNextObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn.SubscribeOnObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableTakeUntilCompletable.TakeUntilMainObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableTakeUntilCompletable.TakeUntilMainObserver.OtherObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableTimeout.TimeOutObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableTimeout.DisposeTask.DisposeObserver, io.reactivex.rxjava3.internal.operators.completable.CompletableToSingle.ToSingle, io.reactivex.rxjava3.internal.operators.completable.CompletableUsing.UsingObserver, io.reactivex.rxjava3.internal.operators.flowable.FlowableMergeWithCompletable.MergeWithSubscriber.OtherObserver, io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapCompletable.FlatMapCompletableMainSubscriber.InnerConsumer, io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapCompletableCompletable.FlatMapCompletableMainSubscriber.InnerObserver, io.reactivex.rxjava3.internal.operators.flowable.FlowableFromCompletable.FromCompletableObserver, io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatWithCompletable.ConcatWithSubscriber, io.reactivex.rxjava3.internal.operators.maybe.MaybeDelayWithCompletable.OtherObserver, io.reactivex.rxjava3.internal.operators.maybe.MaybeFlatMapCompletable.FlatMapCompletableObserver, io.reactivex.rxjava3.internal.operators.maybe.MaybeFromCompletable.FromCompletableObserver, io.reactivex.rxjava3.internal.operators.mixed.CompletableAndThenObservable.AndThenObservableObserver, io.reactivex.rxjava3.internal.operators.mixed.CompletableAndThenPublisher.AndThenPublisherSubscriber, io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapCompletable.ConcatMapCompletableObserver.ConcatMapInnerObserver, io.reactivex.rxjava3.internal.operators.mixed.FlowableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver, io.reactivex.rxjava3.internal.operators.mixed.MaterializeSingleObserver, io.reactivex.rxjava3.internal.operators.mixed.ObservableConcatMapCompletable.ConcatMapCompletableObserver.ConcatMapInnerObserver, io.reactivex.rxjava3.internal.operators.mixed.ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableFlatMapCompletable.FlatMapCompletableMainObserver.InnerObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableFlatMapCompletableCompletable.FlatMapCompletableMainObserver.InnerObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableFromCompletable.FromCompletableObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableMergeWithCompletable.MergeWithObserver.OtherObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableConcatWithCompletable.ConcatWithObserver, io.reactivex.rxjava3.internal.operators.single.SingleDelayWithCompletable.OtherObserver, io.reactivex.rxjava3.internal.operators.single.SingleFlatMapCompletable.FlatMapCompletableObserver, io.reactivex.rxjava3.internal.util.EmptyComponent, io.reactivex.rxjava3.observers.DisposableCompletableObserver, io.reactivex.rxjava3.observers.ResourceCompletableObserver, io.reactivex.rxjava3.observers.TestObserver, io.reactivex.rxjava3.subjects.CompletableSubject
Imports
io.reactivex.rxjava3.annotations.NonNull, io.reactivex.rxjava3.disposables.Disposable

Provides a mechanism for receiving push-based notification of a valueless completion or an error.

When a CompletableObserver is subscribed to a CompletableSource through the CompletableSource#subscribe(CompletableObserver) method, the CompletableSource calls onSubscribe(Disposable) with a Disposable that allows disposing the sequence at any time. A well-behaved CompletableSource will call a CompletableObserver's onError(Throwable) or onComplete() method exactly once as they are considered mutually exclusive terminal signals.

Calling the CompletableObserver's method must happen in a serialized fashion, that is, they must not be invoked concurrently by multiple threads in an overlapping fashion and the invocation pattern must adhere to the following protocol:

    onSubscribe (onError | onComplete)?

Subscribing a CompletableObserver to multiple CompletableSources is not recommended. If such reuse happens, it is the duty of the CompletableObserver implementation to be ready to receive multiple calls to its methods and ensure proper concurrent behavior of its business logic.

Calling onSubscribe(Disposable) or onError(Throwable) with a null argument is forbidden.

The implementations of the onXXX methods should avoid throwing runtime exceptions other than the following cases:

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
onComplete()

Called once the deferred computation completes normally.

public void
onError(@NonNull Throwable
the exception, not null.
e
)

Called once if the deferred computation 'throws' an exception.

public void
onSubscribe(@NonNull Disposable
the Disposable instance to call dispose on for cancellation, not null
d
)

Called once by the Completable to set a Disposable on this instance which then can be used to cancel the subscription at any time.

Method Detail

onCompleteback to summary
public void onComplete()

Called once the deferred computation completes normally.

onErrorback to summary
public void onError(@NonNull Throwable e)

Called once if the deferred computation 'throws' an exception.

Parameters
e:@NonNull Throwable

the exception, not null.

onSubscribeback to summary
public void onSubscribe(@NonNull Disposable d)

Called once by the Completable to set a Disposable on this instance which then can be used to cancel the subscription at any time.

Parameters
d:@NonNull Disposable

the Disposable instance to call dispose on for cancellation, not null