Interface UniSubscription

All Superinterfaces:
Cancellable, Flow.Subscription
All Known Implementing Classes:
UniSerializedSubscriber

public interface UniSubscription extends Flow.Subscription, Cancellable
A Flow.Subscription for the Uni type.

The main different with the Reactive Streams Subscription is about the request protocol. Uni does not use request and triggers the computation at subscription time.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Requests the Uni to cancel and clean up resources.
    default void
    request(long n)
     
  • Method Details

    • cancel

      void cancel()
      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 Flow.Subscription
    • request

      default void request(long n)
      Specified by:
      request in interface Flow.Subscription