Class EmptyUniSubscription

    • Field Detail

      • CANCELLED

        public static final UniSubscription CANCELLED
        A subscription that has been cancelled. The instance that can be shared. Calling cancel() is a no-op.
      • DONE

        public static final UniSubscription DONE
        A subscription that has been done. 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