Class SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T>
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicLong
io.reactivex.rxjava3.internal.operators.single.SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T>
- All Implemented Interfaces:
FlowableSubscriber<T>,SingleObserver<S>,Serializable,org.reactivestreams.Subscriber<T>,org.reactivestreams.Subscription
- Enclosing class:
SingleFlatMapPublisher<T,R>
static final class SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T>
extends AtomicLong
implements SingleObserver<S>, FlowableSubscriber<T>, org.reactivestreams.Subscription
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Disposable(package private) final org.reactivestreams.Subscriber<? super T> (package private) final AtomicReference<org.reactivestreams.Subscription> private static final long -
Constructor Summary
ConstructorsConstructorDescriptionSingleFlatMapPublisherObserver(org.reactivestreams.Subscriber<? super T> actual, Function<? super S, ? extends org.reactivestreams.Publisher<? extends T>> mapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidvoidNotifies theSingleObserverthat theSinglehas experienced an error condition.voidvoidProvides theSingleObserverwith the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)itself) and asynchronous manner.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).voidNotifies theSingleObserverwith a single item and that theSinglehas finished sending push-based notifications.voidrequest(long n) Methods inherited from class java.util.concurrent.atomic.AtomicLong
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatileMethods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
-
mapper
-
parent
-
disposable
Disposable disposable
-
-
Constructor Details
-
SingleFlatMapPublisherObserver
-
-
Method Details
-
onSubscribe
Description copied from interface:SingleObserverProvides theSingleObserverwith the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)itself) and asynchronous manner.- Specified by:
onSubscribein interfaceSingleObserver<S>- Parameters:
d- the Disposable instance whoseDisposable.dispose()can be called anytime to cancel the connection
-
onSuccess
Description copied from interface:SingleObserverNotifies theSingleObserverwith a single item and that theSinglehas finished sending push-based notifications.The
Singlewill not call this method if it callsSingleObserver.onError(java.lang.Throwable).- Specified by:
onSuccessin interfaceSingleObserver<S>- Parameters:
value- the item emitted by theSingle
-
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<S>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<S>
-
onNext
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<S>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<S>
-
onError
Description copied from interface:SingleObserverNotifies theSingleObserverthat theSinglehas experienced an error condition.If the
Singlecalls this method, it will not thereafter callSingleObserver.onSuccess(T).- Specified by:
onErrorin interfaceSingleObserver<S>- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<S>- Parameters:
e- the exception encountered by theSingle
-
request
public void request(long n) - Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-