- Notifications
You must be signed in to change notification settings - Fork57
Library to convert between RxJava 1.x and 2.x/3.x reactive types, schedulers and resource handles.
License
NotificationsYou must be signed in to change notification settings
akarnokd/RxJavaInterop
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Library to convert between RxJava 1.x and 3.x reactive types.
Check out thehttps://github.com/akarnokd/RxJavaBridge project.
gradle
dependencies { implementation "com.github.akarnokd:rxjava3-interop:3.0.2"}Maven search:
importhu.akarnokd.rxjava3.interop.RxJavaInterop;// convert from 1.x to 3.xio.reactivex.rxjava3.core.Flowablef3 =RxJavaInterop.toV3Flowable(rx.Observable);io.reactivex.rxjava3.core.Observableo3 =RxJavaInterop.toV3Observable(rx.Observable);io.reactivex.rxjava3.core.Singles3 =RxJavaInterop.toV3Single(rx.Single);io.reactivex.rxjava3.core.Completablec3 =RxJavaInterop.toV3Completable(rx.Completable);io.reactivex.rxjava3.core.Maybem3s =RxJavaInterop.toV3Maybe(rx.Single);io.reactivex.rxjava3.core.Maybem3c =RxJavaInterop.toV3Maybe(rx.Completable);// convert from 3.x to 1.xrx.Observableo1 =RxJavaInterop.toV1Observable(Publisher);rx.Observableq1 =RxJavaInterop.toV1Observable(ObservableSource,BackpressureStrategy);rx.Singles1 =RxJavaInterop.toV1Single(SingleSource);rx.Completablec1 =RxJavaInterop.toV1Completable(CompletableSource);rx.Singles1m =RxJavaInterop.toV1Single(MaybeSource);rx.Completablec1m =RxJavaInterop.toV1Completable(MaybeSource);
Note that 3.xSubjects andFlowableProcessors support only the same input and output types.
// convert from 1.x to 3.xio.reactivex.rxjava3.subjects.Subjectsj3 =RxJavaInterop.toV3Subject(rx.subjects.Subject);io.reactivex.rxjava3.processors.FlowableProcessorfp3 =RxJavaInterop.toV3Processor(rx.subjects.Subject);// convert from 3.x to 1.xrx.subjects.Subjectsj1 =RxJavaInterop.toV1Subject(io.reactivex.rxjava3.subjects.Subject);rx.subjects.Subjectsj1b =RxJavaInterop.toV1Subject(io.reactivex.rxjava3.processors.FlowableProcessor);
// convert from 1.x to 3.xio.reactivex.rxjava3.core.FlowableTransformerft3 =RxJavaInterop.toV3Transformer(rx.Observable.Transformer);io.reactivex.rxjava3.core.ObservableTransformerot3 =RxJavaInterop.toV3Transformer(rx.Observable.Transformer,io.reactivex.rxjava3.core.BackpressureStrategy);io.reactivex.rxjava3.core.SingleTransformerst3 =RxJavaInterop.toV3Transformer(rx.Single.Transformer);io.reactivex.rxjava3.core.CompletableTransformerct3 =RxJavaInterop.toV3Transformer(rx.Completable.Transformer);// convert from 3.x to 1.xrx.Observable.Transformerft1 =RxJavaInterop.toV1Transformer(io.reactivex.rxjava3.core.FlowableTransformer);rx.Observable.Transformerot1 =RxJavaInterop.toV1Transformer(io.reactivex.rxjava3.core.ObservableTransformer,io.reactivex.rxjava3.core.BackpressureStrategy);rx.Single.Transformerst1 =RxJavaInterop.toV1Transformer(io.reactivex.rxjava3.core.SingleTransformer);rx.Completable.Transformerct1 =RxJavaInterop.toV1Transformer(io.reactivex.rxjava3.core.CompletableTransformer);
// convert from 1.x to 3.xio.reactivex.rxjava3.core.FlowableOperatorfo3 =RxJavaInterop.toV3Operator(rx.Observable.Operator);// convert from 3.x to 1.xrx.Observable.Operatorfo1 =RxJavaInterop.toV1Operator(io.reactivex.rxjava3.core.FlowableOperator);
// convert from 1.x to 3.xio.reactivex.rxjava3.disposables.Disposabled3 =RxJavaInterop.toV3Disposable(rx.Subscription);// convert from 3.x to 1.xrx.Subscriptions1 =RxJavaInterop.toV1Subscription(io.reactivex.rxjava3.disposables.Disposable);
// convert from 1.x to 3.xio.reactivex.rxjava3.core.Schedulers3 =RxJavaInterop.toV3Scheduler(rx.Scheduler);// convert from 3.x to 1.xrx.Schedulers1 =RxJavaInterop.toV1Scheduler(io.reactivex.rxjava3.core.Scheduler);
About
Library to convert between RxJava 1.x and 2.x/3.x reactive types, schedulers and resource handles.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.