Package io.smallrye.mutiny.groups
Class UniAny
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniAny
-
public class UniAny extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Uni<T>of(Uni<? super T>... unis)Likeof(Iterable)but with an array ofUnias parameter<T> Uni<T>of(java.lang.Iterable<? extends Uni<? super T>> iterable)Creates aUniforwarding the first event (item or failure).
-
-
-
Field Detail
-
INSTANCE
public static final UniAny INSTANCE
-
-
Method Detail
-
of
@SafeVarargs public final <T> Uni<T> of(Uni<? super T>... unis)
Likeof(Iterable)but with an array ofUnias parameter- Type Parameters:
T- the type of item emitted by the different unis.- Parameters:
unis- the array, must not benull, must not contain @{code null}- Returns:
- the produced
Uni
-
of
public <T> Uni<T> of(java.lang.Iterable<? extends Uni<? super T>> iterable)
Creates aUniforwarding the first event (item or failure). It behaves like the fastest of these competing unis. If the passed iterable is empty, the resultingUnigets anullitem just after subscription.This method subscribes to the set of
Uni. When one of theUnifires an item or a failure a failure, the event is propagated downstream. Also the other subscriptions are cancelled.Note that the callback from the subscriber are called on the thread used to fire the event of the selected
Uni. UseUni.emitOn(Executor)to change that thread.If the subscription to the returned
Uniis cancelled, the subscription to theuniscontained in theiterableare also cancelled.
-
-