public final class RxJavaBridge
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
startUsingV2Schedulers()
Wraps all standard V2 Schedulers into V3 Schedulers and installs
scheduler hooks in the V3 RxJavaPlugins so that both RxJava 2 and
RxJava 3 use the same backing scheduler implementations.
|
static void |
startUsingV3Schedulers()
Wraps all standard V3 Schedulers into V2 Schedulers and installs
scheduler hooks in the V2 RxJavaPlugins so that both RxJava 2 and
RxJava 3 use the same backing scheduler implementations.
|
static void |
stopUsingV2Schedulers()
Stop using the V2 standard schedulers by resetting the V3 scheduler hooks to their
default (null) handlers in the V3 RxJavaPlugins.
|
static void |
stopUsingV3Schedulers()
Stop using the V3 standard schedulers by resetting the V2 scheduler hooks to their
default (null) handlers in the V2 RxJavaPlugins.
|
static CompletableConverter<Completable> |
toV2Completable()
Returns the shared singleton instance of a V3 Completable converter
that when applied in V3
Completable.to(io.reactivex.rxjava3.core.CompletableConverter)-based
fluent conversions, produces a V2 Completable instance. |
static Completable |
toV2Completable(Completable source)
Wraps a V3 Completable and exposes it as a V2 Completable.
|
static Disposable |
toV2Disposable(Disposable disposable)
Wraps a V3 Disposable and exposes it as a V2 Disposable.
|
static <T> FlowableConverter<T,Flowable<T>> |
toV2Flowable()
Returns the shared singleton instance of a V3 Flowable converter
that when applied in V3
Flowable.to(io.reactivex.rxjava3.core.FlowableConverter)-based
fluent conversions, produces a V2 Flowable instance. |
static <T> Flowable<T> |
toV2Flowable(Flowable<T> source)
Wraps a V3 Flowable and exposes it as a V2 Flowable.
|
static <T> MaybeConverter<T,Maybe<T>> |
toV2Maybe()
Returns the shared singleton instance of a V3 Maybe converter
that when applied in V3
Maybe.to(io.reactivex.rxjava3.core.MaybeConverter)-based
fluent conversions, produces a V2 Maybe instance. |
static <T> Maybe<T> |
toV2Maybe(Maybe<T> source)
Wraps a V3 Maybe and exposes it as a V2 Maybe.
|
static <T> ObservableConverter<T,Observable<T>> |
toV2Observable()
Returns the shared singleton instance of a V3 Observable converter
that when applied in V3
Observable.to(io.reactivex.rxjava3.core.ObservableConverter)-based
fluent conversions, produces a V2 Observable instance. |
static <T> Observable<T> |
toV2Observable(Observable<T> source)
Wraps a V3 Observable and exposes it as a V2 Observable.
|
static Scheduler |
toV2Scheduler(Scheduler scheduler)
Wraps a V3 Scheduler and exposes it as a V2 Scheduler.
|
static <T> SingleConverter<T,Single<T>> |
toV2Single()
Returns the shared singleton instance of a V3 Single converter
that when applied in V3
Single.to(io.reactivex.rxjava3.core.SingleConverter)-based
fluent conversions, produces a V2 Single instance. |
static <T> Single<T> |
toV2Single(Single<T> source)
Wraps a V3 Single and exposes it as a V2 Single.
|
static CompletableConverter<Completable> |
toV3Completable()
Returns the shared singleton instance of a V2 Completable converter
that when applied in V2
Completable.as(io.reactivex.CompletableConverter)-based
fluent conversions, produces a V3 Completable instance. |
static Completable |
toV3Completable(Completable source)
Wraps a V2 Completable and exposes it as a V3 Completable.
|
static Disposable |
toV3Disposable(Disposable disposable)
Wraps a V2 Disposable and exposes it as a V3 Disposable.
|
static <T> FlowableConverter<T,Flowable<T>> |
toV3Flowable()
Returns the shared singleton instance of a V2 Flowable converter
that when applied in V2
Flowable.as(io.reactivex.FlowableConverter)-based
fluent conversions, produces a V3 Flowable instance. |
static <T> Flowable<T> |
toV3Flowable(Flowable<T> source)
Wraps a V2 Flowable and exposes it as a V3 Flowable.
|
static <T> MaybeConverter<T,Maybe<T>> |
toV3Maybe()
Returns the shared singleton instance of a V2 Maybe converter
that when applied in V2
Maybe.as(io.reactivex.MaybeConverter)-based
fluent conversions, produces a V3 Maybe instance. |
static <T> Maybe<T> |
toV3Maybe(Maybe<T> source)
Wraps a V2 Maybe and exposes it as a V3 Maybe.
|
static <T> ObservableConverter<T,Observable<T>> |
toV3Observable()
Returns the shared singleton instance of a V2 Observable converter
that when applied in V2
Observable.as(io.reactivex.ObservableConverter)-based
fluent conversions, produces a V3 Observable instance. |
static <T> Observable<T> |
toV3Observable(Observable<T> source)
Wraps a V2 Observable and exposes it as a V3 Observable.
|
static Scheduler |
toV3Scheduler(Scheduler scheduler)
Wraps a V2 Scheduler and exposes it as a V3 Scheduler.
|
static <T> SingleConverter<T,Single<T>> |
toV3Single()
Returns the shared singleton instance of a V2 Single converter
that when applied in V2
Single.as(io.reactivex.SingleConverter)-based
fluent conversions, produces a V3 Single instance. |
static <T> Single<T> |
toV3Single(Single<T> source)
Wraps a V2 Single and exposes it as a V3 Single.
|
public static <T> Flowable<T> toV2Flowable(Flowable<T> source)
T - the element type of the sequencesource - the source V3 Flowablepublic static <T> Flowable<T> toV3Flowable(Flowable<T> source)
T - the element type of the sequencesource - the source V2 Flowablepublic static <T> FlowableConverter<T,Flowable<T>> toV3Flowable()
Flowable.as(io.reactivex.FlowableConverter)-based
fluent conversions, produces a V3 Flowable instance.T - the element type of the sequencepublic static <T> FlowableConverter<T,Flowable<T>> toV2Flowable()
Flowable.to(io.reactivex.rxjava3.core.FlowableConverter)-based
fluent conversions, produces a V2 Flowable instance.T - the element type of the sequencepublic static <T> Observable<T> toV2Observable(Observable<T> source)
T - the element type of the sequencesource - the source V3 Observablepublic static <T> Observable<T> toV3Observable(Observable<T> source)
T - the element type of the sequencesource - the source V2 Observablepublic static <T> ObservableConverter<T,Observable<T>> toV3Observable()
Observable.as(io.reactivex.ObservableConverter)-based
fluent conversions, produces a V3 Observable instance.T - the element type of the sequencepublic static <T> ObservableConverter<T,Observable<T>> toV2Observable()
Observable.to(io.reactivex.rxjava3.core.ObservableConverter)-based
fluent conversions, produces a V2 Observable instance.T - the element type of the sequencepublic static <T> Maybe<T> toV2Maybe(Maybe<T> source)
T - the element type of the sequencesource - the source V3 Maybepublic static <T> Maybe<T> toV3Maybe(Maybe<T> source)
T - the element type of the sequencesource - the source V2 Maybepublic static <T> MaybeConverter<T,Maybe<T>> toV3Maybe()
Maybe.as(io.reactivex.MaybeConverter)-based
fluent conversions, produces a V3 Maybe instance.T - the element type of the sequencepublic static <T> MaybeConverter<T,Maybe<T>> toV2Maybe()
Maybe.to(io.reactivex.rxjava3.core.MaybeConverter)-based
fluent conversions, produces a V2 Maybe instance.T - the element type of the sequencepublic static <T> Single<T> toV2Single(Single<T> source)
T - the element type of the sequencesource - the source V3 Singlepublic static <T> Single<T> toV3Single(Single<T> source)
T - the element type of the sequencesource - the source V2 Singlepublic static <T> SingleConverter<T,Single<T>> toV3Single()
Single.as(io.reactivex.SingleConverter)-based
fluent conversions, produces a V3 Single instance.T - the element type of the sequencepublic static <T> SingleConverter<T,Single<T>> toV2Single()
Single.to(io.reactivex.rxjava3.core.SingleConverter)-based
fluent conversions, produces a V2 Single instance.T - the element type of the sequencepublic static Completable toV2Completable(Completable source)
source - the source V3 Completablepublic static Completable toV3Completable(Completable source)
source - the source V2 Completablepublic static CompletableConverter<Completable> toV3Completable()
Completable.as(io.reactivex.CompletableConverter)-based
fluent conversions, produces a V3 Completable instance.public static CompletableConverter<Completable> toV2Completable()
Completable.to(io.reactivex.rxjava3.core.CompletableConverter)-based
fluent conversions, produces a V2 Completable instance.public static Disposable toV2Disposable(Disposable disposable)
disposable - the source V3 Disposablepublic static Disposable toV3Disposable(Disposable disposable)
disposable - the source V2 Disposablepublic static Scheduler toV2Scheduler(Scheduler scheduler)
scheduler - the source V3 Schedulerpublic static Scheduler toV3Scheduler(Scheduler scheduler)
scheduler - the source V2 Schedulerpublic static void startUsingV2Schedulers()
public static void stopUsingV2Schedulers()
public static void startUsingV3Schedulers()
public static void stopUsingV3Schedulers()