Class UniOnCancel<T>


  • public class UniOnCancel<T>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      UniOnCancel​(Uni<T> upstream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Uni<T> call​(java.util.function.Supplier<Uni<?>> supplier)
      Attaches an action executed when the subscription is cancelled.
      Uni<T> invoke​(java.lang.Runnable action)
      Attaches an action executed when the subscription is cancelled.
      • Methods inherited from class java.lang.Object

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

      • UniOnCancel

        public UniOnCancel​(Uni<T> upstream)
    • Method Detail

      • invoke

        @CheckReturnValue
        public Uni<T> invoke​(java.lang.Runnable action)
        Attaches an action executed when the subscription is cancelled. The upstream is not cancelled yet, but will be cancelled when the callback completes. Note that if the callback throws an exception then it will be discarded.
        Parameters:
        action - the action, must not be null
        Returns:
        a new Uni
      • call

        @CheckReturnValue
        public Uni<T> call​(java.util.function.Supplier<Uni<?>> supplier)
        Attaches an action executed when the subscription is cancelled. The upstream is not cancelled yet, but will be cancelled when the returned Uni completes. The supplier must not return null. Note that the result or the failure of the Uni will be discarded.
        Parameters:
        supplier - the Uni supplier, must not return null.
        Returns:
        a new Uni