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) |
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, wait
expectedFromUpstream, getError, isCancelled, limit, requestedFromDownstream
protected 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()
Receiver
public boolean isStarted()
Trackable
public org.reactivestreams.Subscriber<? super O> downstream()
Producer
downstream
in interface Producer
public final void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe
in interface org.reactivestreams.Subscriber<I>
protected void doOnSubscribe(org.reactivestreams.Subscription 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)
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.Subscription
protected void doRequest(long n)
public final void cancel()
cancel
in interface org.reactivestreams.Subscription
protected void doCancel()
public boolean isTerminated()
Trackable
isTerminated
in interface Trackable
public long getCapacity()
Trackable
getCapacity
in interface Trackable
public long getPending()
Trackable
getPending
in interface Trackable
public java.lang.String toString()
toString
in class java.lang.Object