public class UniOnFailure<T> extends Object
| Constructor and Description |
|---|
UniOnFailure(Uni<T> upstream,
Predicate<? super Throwable> predicate) |
| Modifier and Type | Method and Description |
|---|---|
Uni<T> |
apply(Function<? super Throwable,? extends Throwable> mapper)
|
Uni<T> |
invoke(Consumer<Throwable> callback)
|
Uni<T> |
recoverWithItem(Function<? super Throwable,? extends T> fallback) |
Uni<T> |
recoverWithItem(Supplier<T> supplier) |
Uni<T> |
recoverWithItem(T fallback) |
Uni<T> |
recoverWithUni(Function<? super Throwable,? extends Uni<? extends T>> fallback) |
Uni<T> |
recoverWithUni(Supplier<? extends Uni<? extends T>> supplier) |
Uni<T> |
recoverWithUni(Uni<? extends T> fallback) |
UniRetry<T> |
retry() |
public Uni<T> invoke(Consumer<Throwable> callback)
callback - the callback, must not be nullUnipublic Uni<T> apply(Function<? super Throwable,? extends Throwable> mapper)
Uni invoking the given function when the current Uni propagates a failure. The
function can transform the received failure into another exception that will be fired as failure downstream.mapper - the mapper function, must not be null, must not return nullUnipublic Uni<T> recoverWithUni(Function<? super Throwable,? extends Uni<? extends T>> fallback)
Copyright © 2019–2020 SmallRye. All rights reserved.