Package io.smallrye.mutiny.groups
Class UniConvert<T>
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniConvert<T>
-
public class UniConvert<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description UniConvert(Uni<T> upstream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<T>toCompletableFuture()java.util.concurrent.CompletionStage<T>toCompletionStage()org.reactivestreams.Publisher<T>toPublisher()<R> Rwith(java.util.function.Function<Uni<T>,R> converter)Transforms thisUniinto a type using the provided converter.
-
-
-
Method Detail
-
with
public <R> R with(java.util.function.Function<Uni<T>,R> converter)
Transforms thisUniinto a type using the provided converter.- Type Parameters:
R- the result type- Parameters:
converter- the converter function- Returns:
- an instance of R
- Throws:
java.lang.RuntimeException- if the conversion fails.
-
toCompletionStage
@CheckReturnValue public java.util.concurrent.CompletionStage<T> toCompletionStage()
-
toCompletableFuture
@CheckReturnValue public java.util.concurrent.CompletableFuture<T> toCompletableFuture()
-
toPublisher
@CheckReturnValue public org.reactivestreams.Publisher<T> toPublisher()
-
-