上QQ阅读APP看书,第一时间看更新
The Publisher Interface
The definition of this interface is as follows:
public interface Publisher<T> {
public void subscribe(Subscriber<? super T> s);
}
As you can see, Publisher allows the Subscriber interface to subscribe to it so as to receive the message when Publisher produces it.