There's more...

There is an additional interface that should be used with reactive streams. It's the Flow.Processor interface and groups the Flow.Publisher and the Flow.Subscriber interfaces. Its main purpose is to be an element between a publisher and a subscriber to transform the elements produced by the first one into a format that can be processed by the second one. You can have more than one processors in a chain so the output of one of them could be processed by the next one.

Java also defines the Flow class that includes the four interfaces explained before.

Get Java 9 Concurrency Cookbook - Second Edition 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.