The Flow.Subscriber interface is used to receive messages, and its implementation is shown here:
public static interface Flow.Subscriber<T>
This interface is set up to receive messages. It only takes one argument—the subscribed item type, <T>. It has the following methods:
- void onComplete()
- void onError(Throwable throwable)
- void onNext(T item)
- void onSubscribe(Flow.Subscription subscription)