Class CompletableAndThenPublisher.AndThenPublisherSubscriber<R>
java.lang.Object
java.util.concurrent.atomic.AtomicReference<org.reactivestreams.Subscription>
io.reactivex.rxjava3.internal.operators.mixed.CompletableAndThenPublisher.AndThenPublisherSubscriber<R>
- All Implemented Interfaces:
CompletableObserver, FlowableSubscriber<R>, Serializable, org.reactivestreams.Subscriber<R>, org.reactivestreams.Subscription
- Enclosing class:
CompletableAndThenPublisher<R>
static final class CompletableAndThenPublisher.AndThenPublisherSubscriber<R>
extends AtomicReference<org.reactivestreams.Subscription>
implements FlowableSubscriber<R>, CompletableObserver, org.reactivestreams.Subscription
- Since:
- 2.1.15
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final org.reactivestreams.Subscriber<? super R> (package private) org.reactivestreams.Publisher<? extends R> (package private) final AtomicLongprivate static final long(package private) Disposable -
Constructor Summary
ConstructorsConstructorDescriptionAndThenPublisherSubscriber(org.reactivestreams.Subscriber<? super R> downstream, org.reactivestreams.Publisher<? extends R> other) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidCalled once the deferred computation completes normally.voidCalled once if the deferred computation 'throws' an exception.voidvoidCalled once by theCompletableto set aDisposableon this instance which then can be used to cancel the subscription at any time.voidonSubscribe(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).voidrequest(long n) Methods inherited from class AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
-
other
org.reactivestreams.Publisher<? extends R> other -
upstream
Disposable upstream -
requested
-
-
Constructor Details
-
AndThenPublisherSubscriber
-
-
Method Details
-
onNext
-
onError
Description copied from interface:CompletableObserverCalled once if the deferred computation 'throws' an exception.- Specified by:
onErrorin interfaceCompletableObserver- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<R>- Parameters:
t- the exception, notnull.
-
onComplete
public void onComplete()Description copied from interface:CompletableObserverCalled once the deferred computation completes normally.- Specified by:
onCompletein interfaceCompletableObserver- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<R>
-
request
public void request(long n) - Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-
onSubscribe
Description copied from interface:CompletableObserverCalled once by theCompletableto set aDisposableon this instance which then can be used to cancel the subscription at any time.- Specified by:
onSubscribein interfaceCompletableObserver- Parameters:
d- theDisposableinstance to call dispose on for cancellation, not null
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s) 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<R>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<R>
-