Class MultiHelper


  • public class MultiHelper
    extends Object
    • Constructor Detail

      • MultiHelper

        public MultiHelper()
    • Method Detail

      • toReadStream

        public static <T> io.vertx.core.streams.ReadStream<T> toReadStream​(io.smallrye.mutiny.Multi<T> observable)
        Adapts an Mutiny Multi to a Vert.x ReadStream. The returned ReadStream will be subscribed to the Multi.

        Parameters:
        observable - the observable to adapt
        Returns:
        the adapted stream
      • toMulti

        public static <T,​U> io.smallrye.mutiny.Multi<U> toMulti​(io.vertx.core.streams.ReadStream<T> stream,
                                                                      Function<T,​U> mapping)
        Like toMulti(ReadStream) but with a mapping function
      • toMulti

        public static <T> io.smallrye.mutiny.Multi<T> toMulti​(io.vertx.core.streams.ReadStream<T> stream)
        Adapts a Vert.x ReadStream to an Mutiny Multi. After the stream is adapted to a Multi, the original stream handlers should not be used anymore as they will be used by the Multi adapter.

        Parameters:
        stream - the stream to adapt
        Returns:
        the adapted observable