美文网首页
RxJava 2.x 几个可观察者在有、无、错误三情况下的执行迥

RxJava 2.x 几个可观察者在有、无、错误三情况下的执行迥

作者: artshell | 来源:发表于2018-04-20 17:32 被阅读94次

    Flowable: onSubscribe oNext* (onError | onComplete)?
    Observable: onSubscribe oNext* (onError | onComplete)?
    Single: onSubscribe (onSuccess | onError)?
    Completable: onSubscribe (onError | onComplete)?
    Maybe: onSubscribe (onSuccess | onError | onComplete)?

    Maybe is a hybrid of Single and Completable where only one of the | -ed method is called.

    参考链接1: issues/4534
    参考链接2: reactive-streams-jvm

    在Rxjava 1.x (无RSS规范时代),只有Observable、Single、Completable、Maybe这几个可观察者,Single、Completable、Maybe从Observable衍生而来. 规范出来后Rxjava 2.x添加了Flowable可观察支持了RSS规范

    相关文章

      网友评论

          本文标题:RxJava 2.x 几个可观察者在有、无、错误三情况下的执行迥

          本文链接:https://www.haomeiwen.com/subject/xvdzkftx.html