Class SubscriberWrapper<I,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.providers.SubscriberWrapper<I,T>
-
- All Implemented Interfaces:
org.reactivestreams.Processor<T,T>
,org.reactivestreams.Publisher<T>
,org.reactivestreams.Subscriber<T>
public class SubscriberWrapper<I,T> extends Object implements org.reactivestreams.Processor<T,T>
-
-
Constructor Summary
Constructors Constructor Description SubscriberWrapper(org.reactivestreams.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 void
onComplete()
void
onError(Throwable error)
void
onNext(T item)
void
onSubscribe(org.reactivestreams.Subscription s)
Receives the subscription from the upstream.void
subscribe(org.reactivestreams.Subscriber<? super T> s)
Gets called with the downstream subscriber (from reactive messaging).
-
-
-
Constructor Detail
-
SubscriberWrapper
public SubscriberWrapper(org.reactivestreams.Subscriber<I> userSubscriber, Function<T,I> mapper, BiFunction<T,Throwable,CompletionStage<Void>> postAck)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super T> s)
Gets called with the downstream subscriber (from reactive messaging).- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<I>
- Parameters:
s
- the downstream subscriber
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s)
Receives the subscription from the upstream.- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<I>
- Parameters:
s
- the subscription
-
onNext
public void onNext(T item)
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<I>
-
onError
public void onError(Throwable error)
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<I>
-
onComplete
public void onComplete()
- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<I>
-
-