I - the input value typeO - the output value typepublic static class Operators.SubscriberAdapter<I,O> extends Object implements Subscriber<I>, Subscription, Trackable, Receiver, Producer
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 Subscriber<? super O> |
subscriber |
protected Subscription |
subscription |
UNSPECIFIED| Constructor and Description |
|---|
SubscriberAdapter(Subscriber<? super O> subscriber) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
protected void |
doCancel() |
protected void |
doComplete() |
protected void |
doError(Throwable throwable) |
protected void |
doNext(I i) |
protected void |
doOnSubscribe(Subscription subscription)
Hook for further processing of onSubscribe's Subscription.
|
protected void |
doOnSubscriberError(Throwable throwable) |
protected void |
doRequest(long n) |
Subscriber<? super O> |
downstream()
Return the direct data receiver.
|
long |
getCapacity()
Return defined element capacity
|
long |
getPending()
Return current used space in buffer
|
boolean |
isStarted()
Has this upstream started or "onSubscribed" ?
|
boolean |
isTerminated()
Has this upstream finished or "completed" / "failed" ?
|
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(I i) |
void |
onSubscribe(Subscription s) |
void |
request(long n) |
String |
toString() |
Subscription |
upstream()
Return the direct source of data, Supports reference.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexpectedFromUpstream, getError, isCancelled, limit, requestedFromDownstreamprotected final Subscriber<? super O> subscriber
protected Subscription subscription
public SubscriberAdapter(Subscriber<? super O> subscriber)
public final void cancel()
cancel in interface Subscriptionpublic Subscriber<? super O> downstream()
Producerdownstream in interface Producerpublic long getCapacity()
TrackablegetCapacity in interface Trackablepublic long getPending()
TrackablegetPending in interface Trackablepublic boolean isStarted()
Trackablepublic boolean isTerminated()
TrackableisTerminated in interface Trackablepublic final void onComplete()
onComplete in interface Subscriber<I>public final void onError(Throwable t)
onError in interface Subscriber<I>public final void onNext(I i)
onNext in interface Subscriber<I>public final void onSubscribe(Subscription s)
onSubscribe in interface Subscriber<I>public final void request(long n)
request in interface Subscriptionpublic Subscription upstream()
Receiverprotected void doOnSubscribe(Subscription subscription)
subscription - the subscription to optionally processprotected void doNext(I i)
protected void doError(Throwable throwable)
protected void doOnSubscriberError(Throwable throwable)
protected void doComplete()
protected void doRequest(long n)
protected void doCancel()