Class WriteStreamSubscriberImpl<I,​O>

    • Constructor Detail

      • WriteStreamSubscriberImpl

        public WriteStreamSubscriberImpl​(io.vertx.core.streams.WriteStream<O> stream,
                                         Function<I,​O> mapping)
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription subscription)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<I>
      • onNext

        public void onNext​(I item)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<I>
      • onError

        public void onError​(Throwable failure)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<I>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<I>
      • onFailure

        public WriteStreamSubscriber<I> onFailure​(Consumer<? super Throwable> handler)
        Description copied from interface: WriteStreamSubscriber
        Sets the handler to invoke on failure events.

        The underlying WriteStream.end() method is not invoked in this case.

        Specified by:
        onFailure in interface WriteStreamSubscriber<I>
        Parameters:
        handler - the callback invoked with the failure
        Returns:
        a reference to this, so the API can be used fluently
      • onComplete

        public WriteStreamSubscriber<I> onComplete​(Runnable handler)
        Description copied from interface: WriteStreamSubscriber
        Sets the handler to invoke on completion events.

        The underlying WriteStream.end() method is invoked before the given callback.

        Specified by:
        onComplete in interface WriteStreamSubscriber<I>
        Parameters:
        handler - the callback invoked when the completion event is received
        Returns:
        a reference to this, so the API can be used fluently