Class EmptyUniSubscription

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static UniSubscription CANCELLED
      The instance that can be shared.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Requests the Uni to cancel and clean up resources.
      static <T> void propagateFailureEvent​(UniSubscriber<T> subscriber, java.lang.Throwable failure)
      Propagates a failure to the given downstream subscriber.
      • Methods inherited from class java.lang.Object

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

      • CANCELLED

        public static final UniSubscription CANCELLED
        The instance that can be shared. Calling cancel() is a no-op.
    • Method Detail

      • propagateFailureEvent

        public static <T> void propagateFailureEvent​(UniSubscriber<T> subscriber,
                                                     java.lang.Throwable failure)
        Propagates a failure to the given downstream subscriber. The subscriber receive the CANCELLED subscription followed with the failure.
        Type Parameters:
        T - the expected item type
        Parameters:
        subscriber - the subscriber, must not be null
        failure - the failure, must not be null
      • cancel

        public void cancel()
        Description copied from interface: UniSubscription
        Requests the Uni to cancel and clean up resources. If the item is retrieved after cancellation, it is not forwarded to the subscriber. If the cancellation happens after the delivery of the item, this call is ignored.

        Calling this method, emits the cancellation event upstream.

        Specified by:
        cancel in interface Cancellable
        Specified by:
        cancel in interface org.reactivestreams.Subscription
        Specified by:
        cancel in interface UniSubscription