官术网_书友最值得收藏!

The Subscriber Interface

The definition of this interface is as follows:

public interface Subscriber<T> {
public void onSubscribe(Subscription s);
public void onNext(T t);
public void onError(Throwable t);
public void onComplete();
}

As you can see, the Subscriber interface's onSubscribe method allows Subscriber to be notified when Publisher accepts the Subscription. The onNext method is invoked when new items get published. As the name suggests, the onError method is invoked when there's an error and the onComplete method gets invoked when Publisher has completed its function.

主站蜘蛛池模板: 丰都县| 西青区| 上饶县| 黄陵县| 石林| 汶川县| 七台河市| 北京市| 南京市| 云龙县| 灯塔市| 丹寨县| 青浦区| 河源市| 偏关县| 富民县| 辉南县| 和平县| 简阳市| 察哈| 古丈县| 延长县| 班戈县| 玛沁县| 兰考县| 马尔康县| 通渭县| 昌都县| 桐柏县| 嘉兴市| 武宁县| 辽宁省| 宁蒗| 紫云| 开远市| 松潘县| 普兰店市| 临漳县| 外汇| 蒙山县| 义乌市|