Package io.smallrye.mutiny.vertx
Class MultiHelper
java.lang.Object
io.smallrye.mutiny.vertx.MultiHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.smallrye.mutiny.Multi<T>
toMulti
(io.vertx.core.streams.ReadStream<T> stream) Adapts a Vert.xio.vertx.core.streams.ReadStream<T>
to an Mutinyio.smallrye.mutiny.Multi<T>
.static <T,
U> io.smallrye.mutiny.Multi<U> LiketoMulti(ReadStream)
but with amapping
functionstatic <T> io.vertx.core.streams.ReadStream<T>
toReadStream
(io.smallrye.mutiny.Multi<T> observable) Adapts an Mutinyio.smallrye.mutiny.Multi<T>
to a Vert.xio.vertx.core.streams.ReadStream<T>
.
-
Constructor Details
-
MultiHelper
public MultiHelper()
-
-
Method Details
-
toReadStream
public static <T> io.vertx.core.streams.ReadStream<T> toReadStream(io.smallrye.mutiny.Multi<T> observable) Adapts an Mutinyio.smallrye.mutiny.Multi<T>
to a Vert.xio.vertx.core.streams.ReadStream<T>
. The returnedReadStream
will be subscribed to theio.smallrye.mutiny.Multi<T>
.- 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) LiketoMulti(ReadStream)
but with amapping
function -
toMulti
public static <T> io.smallrye.mutiny.Multi<T> toMulti(io.vertx.core.streams.ReadStream<T> stream) Adapts a Vert.xio.vertx.core.streams.ReadStream<T>
to an Mutinyio.smallrye.mutiny.Multi<T>
. 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
-