public abstract class RxReactiveStreams
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static rx.Completable |
toCompletable(org.reactivestreams.Publisher<?> publisher)
Converst a Publisher into a Completable by ignoring all onNext values and emitting
onError or onComplete only.
|
static <T> rx.Observable<T> |
toObservable(org.reactivestreams.Publisher<T> publisher)
Convert a Reactive Streams
Publisher into a Rx Observable . |
static <T> org.reactivestreams.Publisher<T> |
toPublisher(rx.Completable completable)
Converts an RxJava Completable into a Publisher that emits only onError or onComplete.
|
static <T> org.reactivestreams.Publisher<T> |
toPublisher(rx.Observable<T> observable)
Convert a Rx
Observable into a Reactive Streams Publisher . |
static <T> org.reactivestreams.Publisher<T> |
toPublisher(rx.Single<T> single)
Converts a Single into a Publisher which emits an onNext+onComplete if
the source Single signals a non-null onSuccess; or onError if the source signals
onError(NullPointerException) or a null value.
|
static <T> rx.Single<T> |
toSingle(org.reactivestreams.Publisher<T> publisher)
Converts a Publisher into a Single which emits onSuccess if the
Publisher signals an onNext+onComplete; or onError if the publisher signals an
onError, the source Publisher is empty (NoSuchElementException) or the
source Publisher signals more than one onNext (IndexOutOfBoundsException).
|
static <T> org.reactivestreams.Subscriber<T> |
toSubscriber(rx.Subscriber<T> rxSubscriber)
Convert an RxJava
Subscriber into a Reactive Streams Subscriber . |
public static <T> org.reactivestreams.Publisher<T> toPublisher(rx.Observable<T> observable)
Observable
into a Reactive Streams Publisher
.
Use this method when you have an RxJava observable, that you want to be consumed by another library.T
- the value typeobservable
- the Observable
to convertPublisher
public static <T> rx.Observable<T> toObservable(org.reactivestreams.Publisher<T> publisher)
Publisher
into a Rx Observable
.
Use this method when you have a stream from another library, that you want to be consume as an RxJava observable.T
- the value typepublisher
- the Publisher
to convert.Observable
public static <T> org.reactivestreams.Subscriber<T> toSubscriber(rx.Subscriber<T> rxSubscriber)
Subscriber
into a Reactive Streams Subscriber
.T
- the value typerxSubscriber
- an RxJava subscriberpublic static <T> org.reactivestreams.Publisher<T> toPublisher(rx.Completable completable)
T
- the target value typecompletable
- the Completable instance to convertjava.lang.NullPointerException
- if completable is nullpublic static rx.Completable toCompletable(org.reactivestreams.Publisher<?> publisher)
publisher
- the Publisher instance to convertjava.lang.NullPointerException
- if publisher is nullpublic static <T> org.reactivestreams.Publisher<T> toPublisher(rx.Single<T> single)
T
- the value typesingle
- the Single instance to convertjava.lang.NullPointerException
- if single is nullpublic static <T> rx.Single<T> toSingle(org.reactivestreams.Publisher<T> publisher)
T
- the value typepublisher
- the Publisher instance to convertjava.lang.NullPointerException
- if publisher is null