Class UniOnItemIgnore<T>


  • public class UniOnItemIgnore<T>
    extends java.lang.Object
    • 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 current Uni, and continue with the value produced by the given supplier.
      Uni<T> andContinueWith​(T fallback)
      Ignores the item fired by the current Uni, and continue with a default value.
      Uni<java.lang.Void> andContinueWithNull()
      Ignores the item fired by the current Uni, and continue with a null item.
      Uni<T> andFail()
      Like andFail(Throwable) but using an Exception.
      Uni<T> andFail​(java.lang.Throwable failure)
      Ignores the item fired by the current Uni and fails with the passed failure.
      Uni<T> andFail​(java.util.function.Supplier<java.lang.Throwable> supplier)
      Ignores the item fired by the current Uni, and fails with a failure produced using the given Supplier.
      <O> Uni<O> andSwitchTo​(Uni<? extends O> other)
      Ignores the item fired by the current Uni and continue with the given Uni.
      <O> Uni<O> andSwitchTo​(java.util.function.Supplier<Uni<? extends O>> supplier)
      Ignores the item fired by the current Uni and continue with the Uni produced by the given supplier.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UniOnItemIgnore

        public UniOnItemIgnore​(UniOnItem<T> onItem)
    • Method Detail

      • andFail

        @CheckReturnValue
        public Uni<T> andFail​(java.lang.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​(java.util.function.Supplier<java.lang.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
      • 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​(java.util.function.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<java.lang.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​(java.util.function.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