public abstract class SyncSubscriber<T> extends java.lang.Object implements Subscriber<T>
| Constructor and Description |
|---|
SyncSubscriber() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
foreach(T element) |
void |
onComplete()
Successful terminal state.
|
void |
onError(java.lang.Throwable t)
Failed terminal state.
|
void |
onNext(T element)
Data notification sent by the
Publisher in response to requests to Subscription.request(long). |
void |
onSubscribe(Subscription s)
Invoked after calling
Publisher.subscribe(Subscriber). |
public void onSubscribe(Subscription s)
SubscriberPublisher.subscribe(Subscriber).
No data will start flowing until Subscription.request(long) is invoked.
It is the responsibility of this Subscriber instance to call Subscription.request(long) whenever more data is wanted.
The Publisher will send notifications only in response to Subscription.request(long).
onSubscribe in interface Subscriber<T>s - Subscription that allows requesting data via Subscription.request(long)public void onNext(T element)
SubscriberPublisher in response to requests to Subscription.request(long).onNext in interface Subscriber<T>element - the element signaledprotected abstract boolean foreach(T element)
public void onError(java.lang.Throwable t)
Subscriber
No further events will be sent even if Subscription.request(long) is invoked again.
onError in interface Subscriber<T>t - the throwable signaledpublic void onComplete()
Subscriber
No further events will be sent even if Subscription.request(long) is invoked again.
onComplete in interface Subscriber<T>