Module io.smallrye.mutiny
Class SerializedProcessor<I,O>
- java.lang.Object
-
- io.smallrye.mutiny.operators.multi.processors.SerializedProcessor<I,O>
-
- Type Parameters:
I- the type of item from upstreamO- the type of item propagated to the downstream
- All Implemented Interfaces:
java.util.concurrent.Flow.Processor<I,O>,java.util.concurrent.Flow.Publisher<O>,java.util.concurrent.Flow.Subscriber<I>
public class SerializedProcessor<I,O> extends java.lang.Object implements java.util.concurrent.Flow.Processor<I,O>Wraps a processor into a serialized version of this processor.
-
-
Constructor Summary
Constructors Constructor Description SerializedProcessor(java.util.concurrent.Flow.Processor<I,O> actual)Constructor that wraps an actual processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispatch(java.util.List<java.lang.Object> queue, java.util.concurrent.Flow.Subscriber<I> subscriber)Dispatches the events contained in the queue to the given subscriber.voidonComplete()voidonError(java.lang.Throwable t)voidonNext(I item)voidonSubscribe(java.util.concurrent.Flow.Subscription s)voidsubscribe(java.util.concurrent.Flow.Subscriber<? super O> downstream)
-
-
-
Method Detail
-
subscribe
public void subscribe(java.util.concurrent.Flow.Subscriber<? super O> downstream)
- Specified by:
subscribein interfacejava.util.concurrent.Flow.Publisher<I>
-
onSubscribe
public void onSubscribe(java.util.concurrent.Flow.Subscription s)
- Specified by:
onSubscribein interfacejava.util.concurrent.Flow.Subscriber<I>
-
onNext
public void onNext(I item)
- Specified by:
onNextin interfacejava.util.concurrent.Flow.Subscriber<I>
-
onError
public void onError(java.lang.Throwable t)
- Specified by:
onErrorin interfacejava.util.concurrent.Flow.Subscriber<I>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfacejava.util.concurrent.Flow.Subscriber<I>
-
dispatch
public void dispatch(java.util.List<java.lang.Object> queue, java.util.concurrent.Flow.Subscriber<I> subscriber)Dispatches the events contained in the queue to the given subscriber.- Parameters:
queue- the queue of eventsubscriber- the subscriber to emit the events to
-
-