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 TypeMethodDescriptionvoid
cancel()
void
void
Notifies theSingleObserver
that theSingle
has experienced an error condition.void
void
Provides theSingleObserver
with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)
itself) and asynchronous manner.void
onSubscribe
(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)
.void
Notifies theSingleObserver
with a single item and that theSingle
has finished sending push-based notifications.void
request
(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, weakCompareAndSetVolatile
Methods 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:SingleObserver
Provides theSingleObserver
with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)
itself) and asynchronous manner.- Specified by:
onSubscribe
in interfaceSingleObserver<S>
- Parameters:
d
- the Disposable instance whoseDisposable.dispose()
can be called anytime to cancel the connection
-
onSuccess
Description copied from interface:SingleObserver
Notifies theSingleObserver
with a single item and that theSingle
has finished sending push-based notifications.The
Single
will not call this method if it callsSingleObserver.onError(java.lang.Throwable)
.- Specified by:
onSuccess
in interfaceSingleObserver<S>
- Parameters:
value
- the item emitted by theSingle
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s) Description copied from interface:FlowableSubscriber
Implementors 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:
onSubscribe
in interfaceFlowableSubscriber<S>
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<S>
-
onNext
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<S>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<S>
-
onError
Description copied from interface:SingleObserver
Notifies theSingleObserver
that theSingle
has experienced an error condition.If the
Single
calls this method, it will not thereafter callSingleObserver.onSuccess(T)
.- Specified by:
onError
in interfaceSingleObserver<S>
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<S>
- Parameters:
e
- the exception encountered by theSingle
-
request
public void request(long n) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-