Package io.smallrye.mutiny.vertx
Interface WriteStreamSubscriber<T>
-
- Type Parameters:
T
- the type of item.
- All Superinterfaces:
Flow.Subscriber<T>
public interface WriteStreamSubscriber<T> extends Flow.Subscriber<T>
AWriteStream
toFlow.Subscriber
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.-
Methods inherited from interface java.util.concurrent.Flow.Subscriber
onComplete, onError, onNext, onSubscribe
-
-
-
-
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
-
-