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

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.

主站蜘蛛池模板: 新宾| 葵青区| 柞水县| 类乌齐县| 怀宁县| 台东县| 通州市| 大余县| 蕲春县| 莎车县| 讷河市| 西平县| 文山县| 山东| 塘沽区| 西丰县| 周宁县| 秦安县| 安新县| 搜索| 台中县| 格尔木市| 双江| 石泉县| 大方县| 武鸣县| 合肥市| 航空| 吴川市| 哈尔滨市| 壶关县| 永登县| 亳州市| 沙洋县| 孝义市| 镇平县| 兰溪市| 淳化县| 永修县| 剑川县| 青浦区|