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 anull
item.Uni<T>
andFail()
LikeandFail(Throwable)
but using anException
.Uni<T>
andFail(java.lang.Throwable failure)
Ignores the item fired by the currentUni
and 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
@CheckReturnValue public Uni<T> andFail(java.lang.Throwable failure)
Ignores the item fired by the currentUni
and fails with the passed failure.- Parameters:
failure
- the exception to propagate- Returns:
- the new
Uni
-
andFail
@CheckReturnValue 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
@CheckReturnValue public Uni<T> andFail()
LikeandFail(Throwable)
but using anException
.- Returns:
- the new
Uni
-
andSwitchTo
@CheckReturnValue 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
@CheckReturnValue 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
@CheckReturnValue public Uni<T> andContinueWith(T fallback)
Ignores the item fired by the currentUni
, and continue with a default value. Note that if the currentUni
fails, the default value is not used.- Parameters:
fallback
- the value to continue with, can benull
- Returns:
- the new
Uni
-
andContinueWithNull
@CheckReturnValue public Uni<java.lang.Void> andContinueWithNull()
Ignores the item fired by the currentUni
, and continue with anull
item.- Returns:
- the new
Uni
-
andContinueWith
@CheckReturnValue 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 currentUni
fails, the supplier is not used.- Parameters:
supplier
- the default value, must not benull
, can producenull
- Returns:
- the new
Uni
-
-