Package io.smallrye.mutiny.vertx
Interface WriteStreamSubscriber<T>
-
- Type Parameters:
T
- the type of item.
- All Superinterfaces:
org.reactivestreams.Subscriber<T>
public interface WriteStreamSubscriber<T> extends org.reactivestreams.Subscriber<T>
AWriteStream
toSubscriber
adapter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WriteStreamSubscriber<T>
onComplete(Runnable callback)
Sets the handler to invoke on completion events.WriteStreamSubscriber<T>
onFailure(Consumer<? super Throwable> callback)
Sets the handler to invoke on failure events.WriteStreamSubscriber<T>
onWriteStreamError(Consumer<? super Throwable> callback)
Sets the handler to invoke if the adaptedWriteStream
fails.
-
-
-
Method Detail
-
onFailure
WriteStreamSubscriber<T> onFailure(Consumer<? super Throwable> callback)
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
WriteStreamSubscriber<T> onComplete(Runnable callback)
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
WriteStreamSubscriber<T> onWriteStreamError(Consumer<? super Throwable> callback)
Sets the handler to invoke if the adaptedWriteStream
fails.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
-
-