Class UniOnItemIgnore<T>

java.lang.Object
io.smallrye.mutiny.groups.UniOnItemIgnore<T>

public class UniOnItemIgnore<T> extends Object
  • Constructor Details

    • UniOnItemIgnore

      public UniOnItemIgnore(UniOnItem<T> onItem)
  • Method Details

    • andFail

      @CheckReturnValue public Uni<T> andFail(Throwable failure)
      Ignores the item fired by the current Uni and fails with the passed failure.
      Parameters:
      failure - the exception to propagate
      Returns:
      the new Uni
    • andFail

      @CheckReturnValue public Uni<T> andFail(Supplier<Throwable> supplier)
      Ignores the item fired by the current Uni, and fails with a failure produced using the given Supplier.
      Parameters:
      supplier - the supplier to produce the failure, must not be null, must not produce null
      Returns:
      the new Uni
    • andFail

      @CheckReturnValue public Uni<T> andFail()
      Like andFail(Throwable) but using an Exception.
      Returns:
      the new Uni
    • andSwitchTo

      @CheckReturnValue public <O> Uni<O> andSwitchTo(Uni<? extends O> other)
      Ignores the item fired by the current Uni and continue with the given Uni.
      Type Parameters:
      O - the type of the new Uni
      Parameters:
      other - the uni to continue with, must not be null
      Returns:
      the new Uni
    • andSwitchTo

      @CheckReturnValue public <O> Uni<O> andSwitchTo(Supplier<Uni<? extends O>> supplier)
      Ignores the item fired by the current Uni and continue with the Uni produced by the given supplier.
      Type Parameters:
      O - the type of the new Uni
      Parameters:
      supplier - the supplier to produce the new Uni, must not be null, must not produce null
      Returns:
      the new Uni
    • andContinueWith

      @CheckReturnValue public Uni<T> andContinueWith(T fallback)
      Ignores the item fired by the current Uni, and continue with a default value. Note that if the current Uni fails, the default value is not used.
      Parameters:
      fallback - the value to continue with, can be null
      Returns:
      the new Uni
    • andContinueWithNull

      @CheckReturnValue public Uni<Void> andContinueWithNull()
      Ignores the item fired by the current Uni, and continue with a null item.
      Returns:
      the new Uni
    • andContinueWith

      @CheckReturnValue public Uni<T> andContinueWith(Supplier<? extends T> supplier)
      Ignores the item fired by the current Uni, and continue with the value produced by the given supplier. Note that if the current Uni fails, the supplier is not used.
      Parameters:
      supplier - the default value, must not be null, can produce null
      Returns:
      the new Uni