public class SubscriberBarrier<I,O> extends java.lang.Object implements org.reactivestreams.Subscriber<I>, org.reactivestreams.Subscription, NonBlocking
Subscriber with an asymetric typed wrapped subscriber. Yet it represents a unique relationship between
a Publisher and a Subscriber, it doesn't implement
the Processor interface allowing multiple subscribes.| Modifier and Type | Field and Description |
|---|---|
protected org.reactivestreams.Subscriber<? super O> |
subscriber |
| Constructor and Description |
|---|
SubscriberBarrier(org.reactivestreams.Subscriber<? super O> subscriber) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
protected void |
doCancel() |
protected void |
doComplete() |
protected void |
doError(java.lang.Throwable throwable) |
protected void |
doNext(I i) |
protected void |
doRequest(long n) |
protected void |
doSubscribe(org.reactivestreams.Subscription subscription) |
long |
getCapacity()
Return defined element capacity, used to drive new
Subscription
request needs. |
boolean |
isReactivePull(Dispatcher dispatcher,
long producerCapacity)
Get the assigned
Dispatcher. |
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(I i) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
request(long n) |
protected final org.reactivestreams.Subscriber<? super O> subscriber
public SubscriberBarrier(org.reactivestreams.Subscriber<? super O> subscriber)
public final void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<I>protected void doSubscribe(org.reactivestreams.Subscription subscription)
public final void onNext(I i)
onNext in interface org.reactivestreams.Subscriber<I>protected void doNext(I i)
public final void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<I>protected void doError(java.lang.Throwable throwable)
public final void onComplete()
onComplete in interface org.reactivestreams.Subscriber<I>protected void doComplete()
public final void request(long n)
request in interface org.reactivestreams.Subscriptionprotected void doRequest(long n)
public final void cancel()
cancel in interface org.reactivestreams.Subscriptionprotected void doCancel()
public boolean isReactivePull(Dispatcher dispatcher, long producerCapacity)
NonBlockingDispatcher.isReactivePull in interface NonBlockingpublic long getCapacity()
NonBlockingSubscription
request needs. This is the maximum in-flight data allowed to transit to this elements.getCapacity in interface NonBlocking