T - the type of itempublic class UnicastProcessor<T> extends AbstractMulti<T> implements org.reactivestreams.Processor<T,T>, org.reactivestreams.Subscription
The back pressure model is not using the request protocol but the queue used to store the items. If the queue
gets full, an BackPressureFailure exception is propagated downstream.
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
static <I> UnicastProcessor<I> |
create()
Creates a new
UnicastProcessor using a new unbounded queue. |
static <I> UnicastProcessor<I> |
create(Queue<I> queue,
Runnable onTermination)
Creates a new
UnicastProcessor using the given queue. |
boolean |
hasSubscriber()
Checks whether there is a subscriber listening for the emitted events.
|
void |
onComplete() |
void |
onError(Throwable failure) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription upstream) |
void |
request(long n) |
SerializedProcessor<T,T> |
serialized() |
void |
subscribe(MultiSubscriber<? super T> downstream) |
broadcast, cache, collectItems, convert, emitOn, groupItems, on, onCompletion, onFailure, onFailure, onFailure, onItem, onOverflow, onSubscribe, onTermination, runSubscriptionOn, subscribe, subscribe, toUni, transformpublic static <I> UnicastProcessor<I> create()
UnicastProcessor using a new unbounded queue.I - the type of itempublic static <I> UnicastProcessor<I> create(Queue<I> queue, Runnable onTermination)
UnicastProcessor using the given queue.I - the type of itemqueue - the queue, must not be nullonTermination - the termination callback, can be nullpublic void onSubscribe(org.reactivestreams.Subscription upstream)
onSubscribe in interface org.reactivestreams.Subscriber<T>public void subscribe(MultiSubscriber<? super T> downstream)
subscribe in class AbstractMulti<T>public void onError(Throwable failure)
onError in interface org.reactivestreams.Subscriber<T>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>public void request(long n)
request in interface org.reactivestreams.Subscriptionpublic void cancel()
cancel in interface org.reactivestreams.Subscriptionpublic boolean hasSubscriber()
true if there is a subscriber, false otherwisepublic SerializedProcessor<T,T> serialized()
Copyright © 2019–2020 SmallRye. All rights reserved.