I - the input value typeO - the output value typepublic static class Operators.SubscriberAdapter<I,O> extends java.lang.Object implements org.reactivestreams.Subscriber<I>, org.reactivestreams.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 org.reactivestreams.Subscriber<? super O> |
subscriber |
protected org.reactivestreams.Subscription |
subscription |
UNSPECIFIED| Constructor and Description |
|---|
SubscriberAdapter(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 |
doOnSubscribe(org.reactivestreams.Subscription subscription)
Hook for further processing of onSubscribe's Subscription.
|
protected void |
doOnSubscriberError(java.lang.Throwable throwable) |
protected void |
doRequest(long n) |
org.reactivestreams.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(java.lang.Throwable t) |
void |
onNext(I i) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
request(long n) |
java.lang.String |
toString() |
org.reactivestreams.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 org.reactivestreams.Subscriber<? super O> subscriber
protected org.reactivestreams.Subscription subscription
public SubscriberAdapter(org.reactivestreams.Subscriber<? super O> subscriber)
public org.reactivestreams.Subscription upstream()
Receiverpublic boolean isStarted()
Trackablepublic org.reactivestreams.Subscriber<? super O> downstream()
Producerdownstream in interface Producerpublic final void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<I>protected void doOnSubscribe(org.reactivestreams.Subscription subscription)
subscription - the subscription to optionally processpublic 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)
protected void doOnSubscriberError(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 isTerminated()
TrackableisTerminated in interface Trackablepublic long getCapacity()
TrackablegetCapacity in interface Trackablepublic long getPending()
TrackablegetPending in interface Trackablepublic java.lang.String toString()
toString in class java.lang.Object