Package io.smallrye.mutiny.vertx.impl
Class WriteStreamSubscriberImpl<I,O>
java.lang.Object
io.smallrye.mutiny.vertx.impl.WriteStreamSubscriberImpl<I,O>
- All Implemented Interfaces:
WriteStreamSubscriber<I>,Flow.Subscriber<I>
-
Constructor Summary
ConstructorsConstructorDescriptionWriteStreamSubscriberImpl(io.vertx.core.streams.WriteStream<O> stream, Function<I, O> mapping) -
Method Summary
Modifier and TypeMethodDescriptionvoidonComplete(Runnable handler) Sets the handler to invoke on completion events.voidSets the handler to invoke on failure events.voidvoidonSubscribe(Flow.Subscription subscription) onWriteStreamError(Consumer<? super Throwable> handler) Sets the handler to invoke if the adaptedWriteStreamfails.
-
Constructor Details
-
WriteStreamSubscriberImpl
-
-
Method Details
-
onSubscribe
- Specified by:
onSubscribein interfaceFlow.Subscriber<I>
-
onNext
- Specified by:
onNextin interfaceFlow.Subscriber<I>
-
onError
- Specified by:
onErrorin interfaceFlow.Subscriber<I>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceFlow.Subscriber<I>
-
onFailure
Description copied from interface:WriteStreamSubscriberSets the handler to invoke on failure events.The underlying
WriteStream.end()method is not invoked in this case.- Specified by:
onFailurein interfaceWriteStreamSubscriber<I>- Parameters:
handler- the callback invoked with the failure- Returns:
- a reference to this, so the API can be used fluently
-
onComplete
Description copied from interface:WriteStreamSubscriberSets the handler to invoke on completion events.The underlying
WriteStream.end()method is invoked before the givencallback.- Specified by:
onCompletein interfaceWriteStreamSubscriber<I>- Parameters:
handler- the callback invoked when the completion event is received- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamError
Description copied from interface:WriteStreamSubscriberSets the handler to invoke if the adaptedWriteStreamfails.The underlying
WriteStream.end()method is not invoked in this case.- Specified by:
onWriteStreamErrorin interfaceWriteStreamSubscriber<I>- Parameters:
handler- the callback invoked with the failure- Returns:
- a reference to this, so the API can be used fluently
-