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

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.

主站蜘蛛池模板: 揭西县| 和平区| 多伦县| 上饶市| 两当县| 扶绥县| 敦化市| 泊头市| 昂仁县| 即墨市| 甘德县| 南平市| 礼泉县| 彭泽县| 桃园县| 舒城县| 小金县| 潍坊市| 岫岩| 陇川县| 乌拉特中旗| 海伦市| 达日县| 清水河县| 建阳市| 翼城县| 汶上县| 屏南县| 定安县| 洱源县| 永平县| 工布江达县| 天峻县| 兴海县| 隆子县| 晋中市| 巴林左旗| 丰镇市| 任丘市| 晋州市| 灵丘县|