[Android 知识点] RxAndroid的使用(五)(待更新)
来源:互联网 发布:阿里云200m 编辑:程序博客网 时间:2024/06/05 01:56
Error Handling Operators 错误处理
- Catch — recover from an onError notification by continuing the sequence without error
- Retry — if a source Observable sends an onError notification, resubscribe to it in the hopes that it will complete without error
Observable Utility Operators 通用操作
- Delay — shift the emissions from an Observable forward in time by a particular amount
- Do — register an action to take upon a variety of Observable lifecycle events
- Materialize/Dematerialize — represent both the items emitted and the notifications sent as emitted items, or reverse this process
- ObserveOn — specify the scheduler on which an observer will observe this Observable
- Serialize — force an Observable to make serialized calls and to be well-behaved
- Subscribe — operate upon the emissions and notifications from an Observable
- SubscribeOn — specify the scheduler an Observable should use when it is subscribed to
- TimeInterval — convert an Observable that emits items into one that emits indications of the amount of time elapsed between those emissions
- Timeout — mirror the source Observable, but issue an error notification if a particular period of time elapses without any emitted items
- Timestamp — attach a timestamp to each item emitted by an Observable
- Using — create a disposable resource that has the same lifespan as the Observable
subscribeOn(Schedulers.io())
subscribeOn会修改我们刚刚创建的Observable。在默认情况下Observable的所有代码,包括刚才说到的只有在被订阅之后才会执行的代码,都会在执行subscribe()方法的线程中运行。而通过subscribeOn()方法,这些代码可以在其他线程中执行。
observeOn(AndroidSchedulers.mainThread())
告诉RxJava我们要在UI线程中观察这个Observable
0 0
- [Android 知识点] RxAndroid的使用(五)(待更新)
- [Android 知识点] RxAndroid的使用(四)(待更新)
- [Android 知识点] RxAndroid的使用(六)(待更新)
- [Android 知识点] RxAndroid的使用(七)(待更新)
- [Android 知识点] RxAndroid的使用(一)
- [Android 知识点] RxAndroid的使用(二)
- [Android 知识点] RxAndroid的使用(三)
- Android的知识点(待补充)
- Android RxAndroid使用
- Android RxAndroid使用
- Android am命令使用---待更新
- 五大框架主要知识点总结(待完善)
- RXAndroid Single的使用
- Retrofit + RxAndroid的使用
- RxAndroid的使用
- RxAndroid的使用
- RxAndroid 的使用方式
- 第四、静态库的使用 待更新
- 字&字节&字符&字符串
- GOF23的一些总结(十四)
- [Android 知识点] RxAndroid的使用(四)(待更新)
- [leetCode]168. Excel Sheet Column Title
- 微信小程序春天来了 安卓程序员进入冬眠?
- [Android 知识点] RxAndroid的使用(五)(待更新)
- DirectShow学习笔记总结
- kafka扩容
- [IO系统]01 IO子系统
- Android引导页动画的基本实现方法—ViewPager
- Laravel研究笔记一(Laravel的安装)
- ADB server didn't ACK * failed to start daemon *
- iptables 命令 源代码分析
- 多线程锁升级解决方案(JDK1.5及以后)