Package io.smallrye.mutiny.groups
Class UniOnItemIgnore<T>
- java.lang.Object
-
- io.smallrye.mutiny.groups.UniOnItemIgnore<T>
-
public class UniOnItemIgnore<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description UniOnItemIgnore(UniOnItem<T> onItem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Uni<T>andContinueWith(java.util.function.Supplier<? extends T> supplier)Ignores the item fired by the currentUni, and continue with the value produced by the given supplier.Uni<T>andContinueWith(T fallback)Ignores the item fired by the currentUni, and continue with a default value.Uni<java.lang.Void>andContinueWithNull()Ignores the item fired by the currentUni, and continue with anullitem.Uni<T>andFail()LikeandFail(Throwable)but using anException.Uni<T>andFail(java.lang.Throwable failure)Ignores the item fired by the currentUniand fails with the passed failure.Uni<T>andFail(java.util.function.Supplier<java.lang.Throwable> supplier)Ignores the item fired by the currentUni, and fails with a failure produced using the givenSupplier.<O> Uni<O>andSwitchTo(Uni<? extends O> other)<O> Uni<O>andSwitchTo(java.util.function.Supplier<Uni<? extends O>> supplier)
-
-
-
Method Detail
-
andFail
public Uni<T> andFail(java.lang.Throwable failure)
Ignores the item fired by the currentUniand fails with the passed failure.- Parameters:
failure- the exception to propagate- Returns:
- the new
Uni
-
andFail
public Uni<T> andFail(java.util.function.Supplier<java.lang.Throwable> supplier)
Ignores the item fired by the currentUni, and fails with a failure produced using the givenSupplier.- Parameters:
supplier- the supplier to produce the failure, must not benull, must not producenull- Returns:
- the new
Uni
-
andFail
public Uni<T> andFail()
LikeandFail(Throwable)but using anException.- Returns:
- the new
Uni
-
andSwitchTo
public <O> Uni<O> andSwitchTo(Uni<? extends O> other)
- Type Parameters:
O- the type of the new Uni- Parameters:
other- the uni to continue with, must not benull- Returns:
- the new Uni
-
andSwitchTo
public <O> Uni<O> andSwitchTo(java.util.function.Supplier<Uni<? extends O>> supplier)
- Type Parameters:
O- the type of the new Uni- Parameters:
supplier- the supplier to produce the newUni, must not benull, must not producenull- Returns:
- the new Uni
-
andContinueWith
public Uni<T> andContinueWith(T fallback)
Ignores the item fired by the currentUni, and continue with a default value. Note that if the currentUnifails, the default value is not used.- Parameters:
fallback- the value to continue with, can benull- Returns:
- the new
Uni
-
andContinueWithNull
public Uni<java.lang.Void> andContinueWithNull()
Ignores the item fired by the currentUni, and continue with anullitem.- Returns:
- the new
Uni
-
andContinueWith
public Uni<T> andContinueWith(java.util.function.Supplier<? extends T> supplier)
Ignores the item fired by the currentUni, and continue with the value produced by the given supplier. Note that if the currentUnifails, the supplier is not used.- Parameters:
supplier- the default value, must not benull, can producenull- Returns:
- the new
Uni
-
-