T
- the input value typeR
- the output value typepublic abstract class DeferredScalarSubscriber<T,R> extends DeferredScalarSubscription<R> implements FlowableSubscriber<T>
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasValue
Can indicate if there was at least on onNext call.
|
protected org.reactivestreams.Subscription |
upstream
The upstream subscription.
|
downstream, value
Constructor and Description |
---|
DeferredScalarSubscriber(org.reactivestreams.Subscriber<? super R> downstream)
Creates a DeferredScalarSubscriber instance and wraps a downstream Subscriber.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onSubscribe(org.reactivestreams.Subscription s)
Implementors of this method should make sure everything that needs
to be visible in
Subscriber.onNext(Object) is established before
calling Subscription.request(long) . |
clear, complete, isCancelled, isEmpty, poll, request, requestFusion, tryCancel
offer, offer
accumulateAndGet, addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, incrementAndGet, intValue, lazySet, longValue, set, toString, updateAndGet, weakCompareAndSet
byteValue, shortValue
protected org.reactivestreams.Subscription upstream
protected boolean hasValue
public DeferredScalarSubscriber(org.reactivestreams.Subscriber<? super R> downstream)
downstream
- the downstream subscriber, not null (not verified)public void onSubscribe(org.reactivestreams.Subscription s)
FlowableSubscriber
Subscriber.onNext(Object)
is established before
calling Subscription.request(long)
. In practice this means
no initialization should happen after the request()
call and
additional behavior is thread safe in respect to onNext
.
onSubscribe
in interface FlowableSubscriber<T>
onSubscribe
in interface org.reactivestreams.Subscriber<T>
public void onError(Throwable t)
onError
in interface org.reactivestreams.Subscriber<T>
public void onComplete()
onComplete
in interface org.reactivestreams.Subscriber<T>
public void cancel()
cancel
in interface org.reactivestreams.Subscription
cancel
in class DeferredScalarSubscription<R>
Copyright © 2019. All rights reserved.