Class MultiOperatorProcessor<I,O>
- java.lang.Object
-
- io.smallrye.mutiny.operators.multi.MultiOperatorProcessor<I,O>
-
- All Implemented Interfaces:
MultiSubscriber<I>
,org.reactivestreams.Subscriber<I>
,org.reactivestreams.Subscription
- Direct Known Subclasses:
MultiGroupByOp.MultiGroupByProcessor
,MultiIgnoreOp.MultiIgnoreProcessor
,MultiMapOp.MapProcessor
,MultiReferenceCountSubscriber
,MultiSelectFirstUntilOtherOp.TakeUntilMainProcessor
public abstract class MultiOperatorProcessor<I,O> extends java.lang.Object implements MultiSubscriber<I>, org.reactivestreams.Subscription
-
-
Field Summary
Fields Modifier and Type Field Description protected MultiSubscriber<? super O>
downstream
protected java.util.concurrent.atomic.AtomicReference<org.reactivestreams.Subscription>
upstream
-
Constructor Summary
Constructors Constructor Description MultiOperatorProcessor(MultiSubscriber<? super O> downstream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
protected void
cleanup()
protected boolean
isCancelled()
protected boolean
isDone()
void
onCompletion()
Method called when the upstream emits acompletion
terminal event.void
onFailure(java.lang.Throwable throwable)
Method called when the upstream emits afailure
terminal event.void
onItem(I item)
Method called when the upstream emits anitem
event, in response to to requests toSubscription.request(long)
.void
onSubscribe(org.reactivestreams.Subscription subscription)
void
request(long numberOfItems)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.smallrye.mutiny.subscription.MultiSubscriber
onComplete, onError, onNext
-
-
-
-
Field Detail
-
downstream
protected volatile MultiSubscriber<? super O> downstream
-
upstream
protected java.util.concurrent.atomic.AtomicReference<org.reactivestreams.Subscription> upstream
-
-
Constructor Detail
-
MultiOperatorProcessor
public MultiOperatorProcessor(MultiSubscriber<? super O> downstream)
-
-
Method Detail
-
isDone
protected boolean isDone()
-
isCancelled
protected boolean isCancelled()
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<I>
-
onFailure
public void onFailure(java.lang.Throwable throwable)
Description copied from interface:MultiSubscriber
Method called when the upstream emits afailure
terminal event.No further events will be sent even if
Subscription.request(long)
is invoked again.- Specified by:
onFailure
in interfaceMultiSubscriber<I>
- Parameters:
throwable
- the failure, must not benull
.
-
onItem
public void onItem(I item)
Description copied from interface:MultiSubscriber
Method called when the upstream emits anitem
event, in response to to requests toSubscription.request(long)
.- Specified by:
onItem
in interfaceMultiSubscriber<I>
- Parameters:
item
- the item, must not benull
.
-
onCompletion
public void onCompletion()
Description copied from interface:MultiSubscriber
Method called when the upstream emits acompletion
terminal event.No further events will be sent even if
Subscription.request(long)
is invoked again.- Specified by:
onCompletion
in interfaceMultiSubscriber<I>
-
request
public void request(long numberOfItems)
- Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
cleanup
protected void cleanup()
-
-