I - The upstream sequence typeO - The downstream sequence typepublic static class Operators.MonoSubscriber<I,O> extends java.lang.Object implements org.reactivestreams.Subscriber<I>, Loopback, Trackable, Receiver, Producer, Fuseable, Fuseable.QueueSubscription<O>
Fuseable.ConditionalSubscriber<T>, Fuseable.QueueSubscription<T>, Fuseable.ScalarCallable<T>, Fuseable.SynchronousSubscription<T>| Modifier and Type | Field and Description |
|---|---|
protected org.reactivestreams.Subscriber<? super O> |
actual |
protected O |
value |
UNSPECIFIED| Constructor and Description |
|---|
MonoSubscriber(org.reactivestreams.Subscriber<? super O> actual) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
clear() |
void |
complete(O v)
Tries to emit the value and complete the underlying subscriber or
stores the value away until there is a request for it.
|
java.lang.Object |
connectedOutput() |
org.reactivestreams.Subscriber<? super O> |
downstream()
Return the direct data receiver.
|
boolean |
isCancelled()
Returns true if this Subscription has been cancelled.
|
boolean |
isEmpty() |
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 t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
O |
poll() |
void |
request(long n) |
int |
requestFusion(int mode)
Request a specific fusion mode from this QueueSubscription.
|
void |
setValue(O value) |
int |
size() |
java.lang.Object |
upstream()
Return the direct source of data, Supports reference.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectedInputexpectedFromUpstream, getCapacity, getError, getPending, limit, requestedFromDownstreamadd, addAll, contains, containsAll, element, iterator, offer, peek, remove, remove, removeAll, retainAll, toArray, toArrayprotected final org.reactivestreams.Subscriber<? super O> actual
protected O value
public MonoSubscriber(org.reactivestreams.Subscriber<? super O> actual)
public void request(long n)
request in interface org.reactivestreams.Subscriptionpublic void cancel()
cancel in interface org.reactivestreams.Subscriptionpublic void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<I>public void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<I>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<I>public final boolean isCancelled()
isCancelled in interface Trackablepublic final org.reactivestreams.Subscriber<? super O> downstream()
Producerdownstream in interface Producerpublic void setValue(O value)
public final void complete(O v)
Make sure this method is called at most once
v - the value to emitpublic boolean isStarted()
Trackablepublic java.lang.Object connectedOutput()
connectedOutput in interface Loopbacknull if unavailablepublic boolean isTerminated()
TrackableisTerminated in interface Trackablepublic java.lang.Object upstream()
Receiverpublic int requestFusion(int mode)
Fuseable.QueueSubscriptionOne should request either SYNC, ASYNC or ANY modes (never NONE) and the implementor should return NONE, SYNC or ASYNC (never ANY).
For example, if a source supports only ASYNC fusion but the intermediate operator supports only SYNC fuseable sources, the operator may request SYNC fusion and the source can reject it via NONE, thus the operator can return NONE as well to dowstream and the fusion doesn't happen.
requestFusion in interface Fuseable.QueueSubscription<O>mode - the mode to requestpublic final boolean isEmpty()
isEmpty in interface java.util.Collection<O>public final void clear()
clear in interface java.util.Collection<O>public int size()
size in interface java.util.Collection<O>