Package io.smallrye.mutiny.vertx
Interface WriteStreamSubscriber<T>
- Type Parameters:
T- the type of item.
- All Superinterfaces:
Flow.Subscriber<T>
A
WriteStream to Flow.Subscriber adapter.-
Method Summary
Modifier and TypeMethodDescriptiononComplete(Runnable callback) Sets the handler to invoke on completion events.Sets the handler to invoke on failure events.onWriteStreamError(Consumer<? super Throwable> callback) Sets the handler to invoke if the adaptedWriteStreamfails.Methods inherited from interface java.util.concurrent.Flow.Subscriber
onComplete, onError, onNext, onSubscribe
-
Method Details
-
onFailure
Sets the handler to invoke on failure events.The underlying
WriteStream.end()method is not invoked in this case.- Parameters:
callback- the callback invoked with the failure- Returns:
- a reference to this, so the API can be used fluently
-
onComplete
Sets the handler to invoke on completion events.The underlying
WriteStream.end()method is invoked before the givencallback.- Parameters:
callback- the callback invoked when the completion event is received- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamError
Sets the handler to invoke if the adaptedWriteStreamfails.The underlying
WriteStream.end()method is not invoked in this case.- Parameters:
callback- the callback invoked with the failure- Returns:
- a reference to this, so the API can be used fluently
-