public class UniOnNull<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
Uni<T> |
continueWith(Supplier<? extends T> supplier)
Provides a default item if the current
Uni fires null as item. |
Uni<T> |
continueWith(T fallback)
Provides a default item if the current
Uni fires null as item. |
Uni<T> |
fail()
Like
failWith(Throwable) but using a NoSuchElementException. |
Uni<T> |
failWith(Supplier<? extends Throwable> supplier)
|
Uni<T> |
failWith(Throwable failure)
|
Uni<T> |
switchTo(Supplier<Uni<? extends T>> supplier)
|
Uni<T> |
switchTo(Uni<? extends T> other)
|
public Uni<T> failWith(Supplier<? extends Throwable> supplier)
Uni fires null as item, the produced Uni emits a failure produced
using the given Supplier.supplier - the supplier to produce the failure, must not be null, must not produce nullUnipublic Uni<T> fail()
failWith(Throwable) but using a NoSuchElementException.Unipublic Uni<T> switchTo(Uni<? extends T> other)
Uni fires null as item, the produced Uni emits the events produced
by the Uni passed as parameter.other - the unit to switch to, must not be nullUnipublic Uni<T> switchTo(Supplier<Uni<? extends T>> supplier)
Uni fires null as item, the produced Uni emits the events produced
by an Uni supplied using the passed Suppliersupplier - the supplier to use to produce the uni, must not be null, must not return nullsUnipublic Uni<T> continueWith(T fallback)
Uni fires null as item.fallback - the default item, must not be nullUnipublic Uni<T> continueWith(Supplier<? extends T> supplier)
Uni fires null as item.
The new item is supplied by the given Supplier.supplier - the supplier to produce the new item, must not be null, must not produce nullUniCopyright © 2019–2020 SmallRye. All rights reserved.