T
- Type of items received by the Subscriber
.public final class DemandCheckingSubscriber<T> extends java.lang.Object implements PublisherSource.Subscriber<T>
PublisherSource.Subscriber
that wraps another, and asserts that items are not delivered without sufficient demand.Constructor and Description |
---|
DemandCheckingSubscriber(PublisherSource.Subscriber<? super T> delegate)
Create a new
DemandCheckingSubscriber that delegates to delegate . |
Modifier and Type | Method and Description |
---|---|
void |
onComplete()
Callback to signal completion of the
PublisherSource for this Subscriber . |
void |
onError(java.lang.Throwable t)
Callback to receive an
error for this Subscriber . |
void |
onNext(T t)
Callback to receive a
data element for this Subscriber . |
void |
onSubscribe(PublisherSource.Subscription s)
Callback to receive a
PublisherSource.Subscription for this Subscriber . |
public DemandCheckingSubscriber(PublisherSource.Subscriber<? super T> delegate)
DemandCheckingSubscriber
that delegates to delegate
.delegate
- the PublisherSource.Subscriber
to delegate to.public void onSubscribe(PublisherSource.Subscription s)
PublisherSource.Subscriber
PublisherSource.Subscription
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onSubscribe
in interface PublisherSource.Subscriber<T>
s
- PublisherSource.Subscription
for this Subscriber
.public void onNext(T t)
PublisherSource.Subscriber
data
element for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onNext
in interface PublisherSource.Subscriber<T>
t
- A data
element.public void onError(java.lang.Throwable t)
PublisherSource.Subscriber
error
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onError
in interface PublisherSource.Subscriber<T>
t
- error
for this Subscriber
.public void onComplete()
PublisherSource.Subscriber
PublisherSource
for this Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
onComplete
in interface PublisherSource.Subscriber<T>