Package io.smallrye.mutiny.vertx
Class MultiHelper
- java.lang.Object
-
- io.smallrye.mutiny.vertx.MultiHelper
-
public class MultiHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description MultiHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> io.smallrye.mutiny.Multi<T>
toMulti(io.vertx.core.streams.ReadStream<T> stream)
Adapts a Vert.xReadStream
to an MutinyMulti
.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
functionstatic <T> io.vertx.core.streams.ReadStream<T>
toReadStream(io.smallrye.mutiny.Multi<T> observable)
Adapts an MutinyMulti
to a Vert.xReadStream
.
-
-
-
Method Detail
-
toReadStream
public static <T> io.vertx.core.streams.ReadStream<T> toReadStream(io.smallrye.mutiny.Multi<T> observable)
Adapts an MutinyMulti
to a Vert.xReadStream
. The returnedReadStream
will be subscribed to theMulti
.- 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.xReadStream
to an MutinyMulti
. 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
-
-