Class SubscriberWrapper<I,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.providers.SubscriberWrapper<I,T>
-
- All Implemented Interfaces:
Flow.Processor<T,T>,Flow.Publisher<T>,Flow.Subscriber<T>
public class SubscriberWrapper<I,T> extends Object implements Flow.Processor<T,T>
-
-
Constructor Summary
Constructors Constructor Description SubscriberWrapper(Flow.Subscriber<I> userSubscriber, Function<T,I> mapper, BiFunction<T,Throwable,CompletionStage<Void>> postAck)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonComplete()voidonError(Throwable error)voidonNext(T item)voidonSubscribe(Flow.Subscription s)Receives the subscription from the upstream.voidsubscribe(Flow.Subscriber<? super T> s)Gets called with the downstream subscriber (from reactive messaging).
-
-
-
Constructor Detail
-
SubscriberWrapper
public SubscriberWrapper(Flow.Subscriber<I> userSubscriber, Function<T,I> mapper, BiFunction<T,Throwable,CompletionStage<Void>> postAck)
-
-
Method Detail
-
subscribe
public void subscribe(Flow.Subscriber<? super T> s)
Gets called with the downstream subscriber (from reactive messaging).- Specified by:
subscribein interfaceFlow.Publisher<I>- Parameters:
s- the downstream subscriber
-
onSubscribe
public void onSubscribe(Flow.Subscription s)
Receives the subscription from the upstream.- Specified by:
onSubscribein interfaceFlow.Subscriber<I>- Parameters:
s- the subscription
-
onNext
public void onNext(T item)
- Specified by:
onNextin interfaceFlow.Subscriber<I>
-
onError
public void onError(Throwable error)
- Specified by:
onErrorin interfaceFlow.Subscriber<I>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceFlow.Subscriber<I>
-
-