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>
-
Constructor Summary
ConstructorsConstructorDescriptionSubscriberWrapper(Flow.Subscriber<I> userSubscriber, Function<T, I> mapper, BiFunction<T, Throwable, CompletionStage<Void>> postAck) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidReceives the subscription from the upstream.voidsubscribe(Flow.Subscriber<? super T> s) Gets called with the downstream subscriber (from reactive messaging).
-
Constructor Details
-
SubscriberWrapper
public SubscriberWrapper(Flow.Subscriber<I> userSubscriber, Function<T, I> mapper, BiFunction<T, Throwable, CompletionStage<Void>> postAck)
-
-
Method Details
-
subscribe
Gets called with the downstream subscriber (from reactive messaging).- Specified by:
subscribein interfaceFlow.Publisher<I>- Parameters:
s- the downstream subscriber
-
onSubscribe
Receives the subscription from the upstream.- Specified by:
onSubscribein interfaceFlow.Subscriber<I>- Parameters:
s- the subscription
-
onNext
- Specified by:
onNextin interfaceFlow.Subscriber<I>
-
onError
- Specified by:
onErrorin interfaceFlow.Subscriber<I>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceFlow.Subscriber<I>
-