Package io.smallrye.reactive.messaging
Class SubscriberWrapper<I,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.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> subscriber, 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)
void
subscribe(org.reactivestreams.Subscriber<? super T> s)
Gets call with the downstream subscriber (from reactive messaging)
-
-
-
Constructor Detail
-
SubscriberWrapper
public SubscriberWrapper(org.reactivestreams.Subscriber<I> subscriber, Function<T,I> mapper, BiFunction<T,Throwable,CompletionStage<Void>> postAck)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super T> s)
Gets call 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)
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<I>
-
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>
-
-