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

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.

主站蜘蛛池模板: 合作市| 施甸县| 上犹县| 齐河县| 周至县| 且末县| 巴楚县| 静宁县| 遂溪县| 龙南县| 体育| 格尔木市| 陕西省| 治县。| 弋阳县| 建昌县| 囊谦县| 嘉鱼县| 苏尼特右旗| 静乐县| 甘孜县| 白山市| 会同县| 治多县| 塘沽区| 北安市| 文安县| 扶余县| 温州市| 普格县| 宣化县| 虹口区| 治县。| 双桥区| 周至县| 深水埗区| 泗水县| 西林县| 营山县| 永德县| 新龙县|