The Flow.Subscription interface ensures that only subscribers receive what is requested. Also, as you will see here, a subscription can be canceled at any time:
public static interface Flow.Subscription
This interface does not take any arguments and is the link that controls the messages between instances of Flow.Publisher and Flow.Subscriber. It has the following methods:
- void cancel()
- void request(long n)