The Flow.Publisher interface

The Flow.Publisher interface is a functional interface. A Publisher is a producer of data sent to subscribers:

    @FunctionalInterface    public static interface Flow.Publisher<T>

This functional interface can serve as a lambda expression assignment target. It only takes one argument--the subscribed item type <T>. It has one method:

  • void onSubscribe(Flow.Subscription subscription)

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.