public class WriteStreamSubscriberImpl<I,O> extends Object implements WriteStreamSubscriber<I>
| Constructor and Description |
|---|
WriteStreamSubscriberImpl(io.vertx.core.streams.WriteStream<O> stream,
Function<I,O> mapping) |
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete() |
WriteStreamSubscriber<I> |
onComplete(Runnable handler)
Sets the handler to invoke on completion events.
|
void |
onError(Throwable failure) |
WriteStreamSubscriber<I> |
onFailure(Consumer<? super Throwable> handler)
Sets the handler to invoke on failure events.
|
void |
onNext(I item) |
void |
onSubscribe(org.reactivestreams.Subscription subscription) |
WriteStreamSubscriber<I> |
onWriteStreamError(Consumer<? super Throwable> handler)
Sets the handler to invoke if the adapted
WriteStream fails. |
public void onSubscribe(org.reactivestreams.Subscription subscription)
onSubscribe in interface org.reactivestreams.Subscriber<I>public void onNext(I item)
onNext in interface org.reactivestreams.Subscriber<I>public void onError(Throwable failure)
onError in interface org.reactivestreams.Subscriber<I>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<I>public WriteStreamSubscriber<I> onFailure(Consumer<? super Throwable> handler)
WriteStreamSubscriber
The underlying WriteStream.end() method is not invoked in this case.
onFailure in interface WriteStreamSubscriber<I>handler - the callback invoked with the failurepublic WriteStreamSubscriber<I> onComplete(Runnable handler)
WriteStreamSubscriber
The underlying WriteStream.end() method is invoked before the
given callback.
onComplete in interface WriteStreamSubscriber<I>handler - the callback invoked when the completion event is receivedpublic WriteStreamSubscriber<I> onWriteStreamError(Consumer<? super Throwable> handler)
WriteStreamSubscriberWriteStream fails.
The underlying WriteStream.end() method is not invoked in this case.
onWriteStreamError in interface WriteStreamSubscriber<I>handler - the callback invoked with the failureCopyright © 2019–2020 SmallRye. All rights reserved.