Interface ReadStream<T>

    • Method Detail

      • getDelegate

        io.vertx.core.streams.ReadStream getDelegate()
        Specified by:
        getDelegate in interface StreamBase
      • toMulti

        io.smallrye.mutiny.Multi<T> toMulti()
      • pause

        ReadStream<T> pause()
        Returns:
        a reference to this, so the API can be used fluently
      • resume

        ReadStream<T> resume()
        Returns:
        a reference to this, so the API can be used fluently
      • fetch

        ReadStream<T> fetch​(long amount)
        Parameters:
        amount -
        Returns:
        a reference to this, so the API can be used fluently
      • endHandler

        ReadStream<T> endHandler​(Runnable endHandler)
        Parameters:
        endHandler -
        Returns:
      • pipe

        Pipe<T> pipe()
        Returns:
        a pipe
      • pipeTo

        io.smallrye.mutiny.Uni<Void> pipeTo​(WriteStream<T> dst)
        Pipe this ReadStream to the WriteStream.

        Elements emitted by this stream will be written to the write stream until this stream ends or fails.

        Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        dst - the destination write stream
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • pipeToAndAwait

        Void pipeToAndAwait​(WriteStream<T> dst)
        Blocking variant of io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        dst - the destination write stream
        Returns:
        the Void instance produced by the operation.
      • pipeToAndForget

        void pipeToAndForget​(WriteStream<T> dst)
        Variant of io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream) but you don't need to compose it with other operations.

        Parameters:
        dst - the destination write stream
      • newInstance

        static <T> ReadStream<T> newInstance​(io.vertx.core.streams.ReadStream arg)
      • newInstance

        static <T> ReadStream<T> newInstance​(io.vertx.core.streams.ReadStream arg,
                                             TypeArg<T> __typeArg_T)