Class SyncSubscriber<T>

java.lang.Object
org.reactivestreams.example.unicast.SyncSubscriber<T>
All Implemented Interfaces:
Subscriber<T>

public abstract class SyncSubscriber<T> extends Object implements Subscriber<T>
SyncSubscriber is an implementation of Reactive Streams `Subscriber`, it runs synchronously (on the Publisher's thread) and requests one element at a time and invokes a user-defined method to process each element. NOTE: The code below uses a lot of try-catches to show the reader where exceptions can be expected, and where they are forbidden.