February 2018
Intermediate to advanced
552 pages
13h 46m
English
In the previous sections, we discussed the components of the Flow API one by one in depth. They are all interfaces and are defined as static components within another component of the Flow API. This component is Flow.
In the Java 9 Flow API, this Flow component contains the rest of the four components' static components, as shown here:
Flow.java:
package java.util.concurrent; public final class Flow { private Flow() {} @FunctionalInterface public static interface Publisher<T> { public void subscribe(Subscriber<? super T> subscriber); } public static interface Subscriber<T> { public void onSubscribe(Subscription subscription); public void onNext(T item); public void onError(Throwable throwable); public void onComplete(); } ...Read now
Unlock full access