The Flow.Subscriber interface

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)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset