public class RxUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RxUtils.Logger |
| Constructor and Description |
|---|
RxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> rx.Observable.Transformer<T,T> |
applyCustomSchedulers(android.os.Handler subscribeHandler)
Apply the subscribeOn/observeOn transformation of {custom_handler}/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
applyCustomSchedulers(android.os.Handler subscribeHandler,
android.os.Handler observeHandler)
Apply the subscribeOn/observeOn transformation of computation/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
applyIOSchedulers()
Apply the subscribeOn/observeOn transformation of io/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
applyLogging(java.lang.String name,
RxUtils.Logger logger)
Add a log statement to the onNext, onError, and onCompleted parts of an observable
|
static <T> rx.Observable.Transformer<T,T> |
applyNewThreadSchedulers()
Apply the subscribeOn/observeOn transformation of newThread/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
applySchedulers(rx.Scheduler subscribeScheduler)
Apply the subscribeOn/observeOn transformation of custom/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
applyWorkSchedulers()
Apply the subscribeOn/observeOn transformation of computation/mainThread
to an observable via compose()
|
static <T> rx.Observable.Transformer<T,T> |
benchmark(java.lang.String name,
RxUtils.Logger logger)
Benchmark an observable from the point of subscription to the point of completion
|
public static <T> rx.Observable.Transformer<T,T> applyIOSchedulers()
Apply the subscribeOn/observeOn transformation of io/mainThread to an observable via compose()
Only apply this to observables that are handling I/O work, e.g.; Networking, Database, etc...
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applyNewThreadSchedulers()
Apply the subscribeOn/observeOn transformation of newThread/mainThread to an observable via compose()
Only apply this to observables that are handling work that requires it's own new thread
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applyWorkSchedulers()
Apply the subscribeOn/observeOn transformation of computation/mainThread to an observable via compose()
Only apply this to observables that are handling computation tasks in the background. Basically all non-IO work
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applySchedulers(rx.Scheduler subscribeScheduler)
Apply the subscribeOn/observeOn transformation of custom/mainThread to an observable via compose()
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applyCustomSchedulers(android.os.Handler subscribeHandler)
Apply the subscribeOn/observeOn transformation of {custom_handler}/mainThread to an observable via compose()
Only apply this to observables that are handling computation tasks in the background. Basically all non-IO work
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applyCustomSchedulers(android.os.Handler subscribeHandler,
android.os.Handler observeHandler)
Apply the subscribeOn/observeOn transformation of computation/mainThread to an observable via compose()
Only apply this to observables that are handling computation tasks in the background. Basically all non-IO work
T - the transformation typepublic static <T> rx.Observable.Transformer<T,T> applyLogging(java.lang.String name,
RxUtils.Logger logger)
Add a log statement to the onNext, onError, and onCompleted parts of an observable
T - the transformation typename - the log tag namepublic static <T> rx.Observable.Transformer<T,T> benchmark(java.lang.String name,
RxUtils.Logger logger)
Benchmark an observable from the point of subscription to the point of completion
T - The transformation typename - the name of the observable to print in log statement