Java Magazine, Jan/Feb 2018
ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 62 reactive programming Listing 1 The Reactive Streams Publisher T package org reactivestreams public interface Publisher T void subscribe Subscriber Super T s A Subscriber subscribes to a Publisher receiving notifications on any new values of type T as shown in Listing 2 Listing 2 The Reactive Streams Subscriber package org reactivestreams public interface Subscriber T public void onSubscribe Subscription s public void onNext T t public void onError Throwable t public void onComplete When a Subscriber subscribes to a Publisher it results in a Subscription as shown in Listing 3 Listing 3 The Reactive Streams Subscription package org reactivestreams public interface Subscription public void request long n public void cancel
You must have JavaScript enabled to view digital editions.