public final class AsyncObservable extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Observable<T> |
deferFuture(Supplier<? extends Future<? extends ObservableSource<? extends T>>> publisherFactoryAsync)
Returns an Observable that starts the specified asynchronous factory function whenever a new subscriber
subscribes.
|
static <T> Observable<T> |
deferFuture(Supplier<? extends Future<? extends ObservableSource<? extends T>>> publisherFactoryAsync,
Scheduler scheduler)
Returns an Observable that starts the specified asynchronous factory function whenever a new subscriber
subscribes.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete,
Scheduler scheduler)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future, scheduled on the given Scheduler.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Scheduler scheduler)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future, scheduled on the given Scheduler.
|
static <T> Future<Object> |
forEachFuture(ObservableSource<? extends T> source,
Consumer<? super T> onNext,
Scheduler scheduler)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion
or error through a Future, scheduled on the given scheduler.
|
static <T> DisposableObservable<T> |
runAsync(Scheduler scheduler,
BiConsumer<? super Observer<? super T>,? super Disposable> action)
Runs the provided action on the given scheduler and allows propagation of multiple events to the
observers of the returned DisposableObservable.
|
static <T> DisposableObservable<T> |
runAsync(Scheduler scheduler,
Subject<T> subject,
BiConsumer<? super Observer<? super T>,? super Disposable> action)
Runs the provided action on the given scheduler and allows propagation of multiple events to the
observers of the returned DisposableObservable.
|
static <T> Observable<T> |
start(Supplier<? extends T> func)
Invokes the specified function asynchronously and returns an Observable that emits the result.
|
static <T> Observable<T> |
start(Supplier<? extends T> func,
Scheduler scheduler)
Invokes the specified function asynchronously on the specified Scheduler and returns an Observable that
emits the result.
|
static <T> Observable<T> |
startFuture(Supplier<? extends Future<? extends T>> functionAsync)
Invokes the asynchronous function immediately, surfacing the result through an Observable.
|
static <T> Observable<T> |
startFuture(Supplier<? extends Future<? extends T>> functionAsync,
Scheduler scheduler)
Invokes the asynchronous function immediately, surfacing the result through an Observable and waits on
the specified Scheduler.
|
static SimpleCallable<Observable<Object>> |
toAsync(Action action)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static SimpleCallable<Observable<Object>> |
toAsync(Action action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static <T1,T2> PlainBiFunction<T1,T2,Observable<Object>> |
toAsync(BiConsumer<? super T1,? super T2> action)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static <T1,T2> PlainBiFunction<T1,T2,Observable<Object>> |
toAsync(BiConsumer<? super T1,? super T2> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static <T1,T2,R> PlainBiFunction<T1,T2,Observable<R>> |
toAsync(BiFunction<? super T1,? super T2,? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <T1,T2,R> PlainBiFunction<T1,T2,Observable<R>> |
toAsync(BiFunction<? super T1,? super T2,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <T1> PlainFunction<T1,Observable<Object>> |
toAsync(Consumer<? super T1> action)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static <T1> PlainFunction<T1,Observable<Object>> |
toAsync(Consumer<? super T1> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Observable.
|
static <T1,T2,T3> PlainFunction3<T1,T2,T3,Observable<Object>> |
toAsync(Consumer3<? super T1,? super T2,? super T3> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3> PlainFunction3<T1,T2,T3,Observable<Object>> |
toAsync(Consumer3<? super T1,? super T2,? super T3> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4> |
toAsync(Consumer4<? super T1,? super T2,? super T3,? super T4> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4> |
toAsync(Consumer4<? super T1,? super T2,? super T3,? super T4> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5> |
toAsync(Consumer5<? super T1,? super T2,? super T3,? super T4,? super T5> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5> |
toAsync(Consumer5<? super T1,? super T2,? super T3,? super T4,? super T5> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6> |
toAsync(Consumer6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6> |
toAsync(Consumer6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7> |
toAsync(Consumer7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7> |
toAsync(Consumer7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
toAsync(Consumer8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
toAsync(Consumer8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
toAsync(Consumer9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
toAsync(Consumer9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <T1,R> PlainFunction<T1,Observable<R>> |
toAsync(Function<? super T1,? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <T1,R> PlainFunction<T1,Observable<R>> |
toAsync(Function<? super T1,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <T1,T2,T3,R> |
toAsync(Function3<? super T1,? super T2,? super T3,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,R> |
toAsync(Function3<? super T1,? super T2,? super T3,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,R> |
toAsync(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,R> |
toAsync(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,R> |
toAsync(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,R> |
toAsync(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,R> |
toAsync(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,R> |
toAsync(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,R> |
toAsync(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,R> |
toAsync(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
toAsync(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
toAsync(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
toAsync(Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
toAsync(Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static PlainFunction<Object[],Observable<Object>> |
toAsyncArray(Consumer<? super Object[]> action)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static PlainFunction<Object[],Observable<Object>> |
toAsyncArray(Consumer<? super Object[]> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Observable.
|
static <R> PlainFunction<Object[],Observable<R>> |
toAsyncArray(Function<? super Object[],? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <R> PlainFunction<Object[],Observable<R>> |
toAsyncArray(Function<? super Object[],? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Observable.
|
static <R> SimpleCallable<Observable<R>> |
toAsyncCallable(Callable<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <R> SimpleCallable<Observable<R>> |
toAsyncCallable(Callable<? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <R> SimpleCallable<Observable<R>> |
toAsyncSupplier(Supplier<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
static <R> SimpleCallable<Observable<R>> |
toAsyncSupplier(Supplier<? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Observable.
|
public static <T> Observable<T> start(Supplier<? extends T> func)
Note: The function is called immediately and once, not whenever an observer subscribes to the resulting Observable. Multiple subscriptions to this Observable observe the same return value.
start
by default operates on the computation
Scheduler
.T
- the result value typefunc
- function to run asynchronouslypublic static <T> Observable<T> start(Supplier<? extends T> func, Scheduler scheduler)
Note: The function is called immediately and once, not whenever an observer subscribes to the resulting Observable. Multiple subscriptions to this Observable observe the same return value.
Scheduler
start
works on.T
- the result value typefunc
- function to run asynchronouslyscheduler
- Scheduler to run the function onpublic static SimpleCallable<Observable<Object>> toAsync(Action action)
toAsync
by default operates on the computation
Scheduler
.action
- the action to convertaction
and emits null
public static <R> SimpleCallable<Observable<R>> toAsyncCallable(Callable<? extends R> func)
toAsyncCallable
by default operates on the computation
Scheduler
.R
- the result value typefunc
- the function to convertfunc
and emits its returned valuepublic static <R> SimpleCallable<Observable<R>> toAsyncSupplier(Supplier<? extends R> func)
toAsyncSupplier
by default operates on the computation
Scheduler
.R
- the result value typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1> PlainFunction<T1,Observable<Object>> toAsync(Consumer<? super T1> action)
toAsync
by default operates on the computation
Scheduler
.T1
- first parameter type of the actionaction
- the action to convertaction
and emits null
public static <T1,R> PlainFunction<T1,Observable<R>> toAsync(Function<? super T1,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- first parameter type of the actionR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2> PlainBiFunction<T1,T2,Observable<Object>> toAsync(BiConsumer<? super T1,? super T2> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,R> PlainBiFunction<T1,T2,Observable<R>> toAsync(BiFunction<? super T1,? super T2,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3> PlainFunction3<T1,T2,T3,Observable<Object>> toAsync(Consumer3<? super T1,? super T2,? super T3> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,R> PlainFunction3<T1,T2,T3,Observable<R>> toAsync(Function3<? super T1,? super T2,? super T3,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4> PlainFunction4<T1,T2,T3,T4,Observable<Object>> toAsync(Consumer4<? super T1,? super T2,? super T3,? super T4> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,R> PlainFunction4<T1,T2,T3,T4,Observable<R>> toAsync(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4,T5> PlainFunction5<T1,T2,T3,T4,T5,Observable<Object>> toAsync(Consumer5<? super T1,? super T2,? super T3,? super T4,? super T5> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,T5,R> PlainFunction5<T1,T2,T3,T4,T5,Observable<R>> toAsync(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6> PlainFunction6<T1,T2,T3,T4,T5,T6,Observable<Object>> toAsync(Consumer6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,T5,T6,R> PlainFunction6<T1,T2,T3,T4,T5,T6,Observable<R>> toAsync(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Observable<Object>> toAsync(Consumer7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,R> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Observable<R>> toAsync(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7,T8> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Observable<Object>> toAsync(Consumer8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Observable<R>> toAsync(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7,T8,T9> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Observable<Object>> toAsync(Consumer9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9> action)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeT9
- the ninth parameter typeaction
- the action to convertaction
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Observable<R>> toAsync(Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> func)
toAsync
by default operates on the computation
Scheduler
.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeT9
- the ninth parameter typeR
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static PlainFunction<Object[],Observable<Object>> toAsyncArray(Consumer<? super Object[]> action)
toAsyncArray
by default operates on the computation
Scheduler
.action
- the action to convertaction
and emits null
public static <R> PlainFunction<Object[],Observable<R>> toAsyncArray(Function<? super Object[],? extends R> func)
toAsyncArray
by default operates on the computation
Scheduler
.R
- the result typefunc
- the function to convertfunc
and emits its returned valuepublic static SimpleCallable<Observable<Object>> toAsync(Action action, Scheduler scheduler)
Scheduler
toAsync
works on.action
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits an Objectpublic static <R> SimpleCallable<Observable<R>> toAsyncCallable(Callable<? extends R> func, Scheduler scheduler)
Scheduler
toAsyncCallable
works on.R
- the result value typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <R> SimpleCallable<Observable<R>> toAsyncSupplier(Supplier<? extends R> func, Scheduler scheduler)
Scheduler
toAsyncSupplier
works on.R
- the result value typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1> PlainFunction<T1,Observable<Object>> toAsync(Consumer<? super T1> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- first parameter type of the actionaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,R> PlainFunction<T1,Observable<R>> toAsync(Function<? super T1,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- first parameter type of the actionR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2> PlainBiFunction<T1,T2,Observable<Object>> toAsync(BiConsumer<? super T1,? super T2> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,R> PlainBiFunction<T1,T2,Observable<R>> toAsync(BiFunction<? super T1,? super T2,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3> PlainFunction3<T1,T2,T3,Observable<Object>> toAsync(Consumer3<? super T1,? super T2,? super T3> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,R> PlainFunction3<T1,T2,T3,Observable<R>> toAsync(Function3<? super T1,? super T2,? super T3,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4> PlainFunction4<T1,T2,T3,T4,Observable<Object>> toAsync(Consumer4<? super T1,? super T2,? super T3,? super T4> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,R> PlainFunction4<T1,T2,T3,T4,Observable<R>> toAsync(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4,T5> PlainFunction5<T1,T2,T3,T4,T5,Observable<Object>> toAsync(Consumer5<? super T1,? super T2,? super T3,? super T4,? super T5> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,T5,R> PlainFunction5<T1,T2,T3,T4,T5,Observable<R>> toAsync(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6> PlainFunction6<T1,T2,T3,T4,T5,T6,Observable<Object>> toAsync(Consumer6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,T5,T6,R> PlainFunction6<T1,T2,T3,T4,T5,T6,Observable<R>> toAsync(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Observable<Object>> toAsync(Consumer7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,R> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Observable<R>> toAsync(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7,T8> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Observable<Object>> toAsync(Consumer8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Observable<R>> toAsync(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T1,T2,T3,T4,T5,T6,T7,T8,T9> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Observable<Object>> toAsync(Consumer9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9> action, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeT9
- the ninth parameter typeaction
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Observable<R>> toAsync(Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.T1
- the first parameter typeT2
- the second parameter typeT3
- the third parameter typeT4
- the fourth parameter typeT5
- the fifth parameter typeT6
- the sixth parameter typeT7
- the seventh parameter typeT8
- the eighth parameter typeT9
- the ninth parameter typeR
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static PlainFunction<Object[],Observable<Object>> toAsyncArray(Consumer<? super Object[]> action, Scheduler scheduler)
Scheduler
toAsync
works on.action
- the action to convertscheduler
- the Scheduler used to execute the action
action
and emits null
public static <R> PlainFunction<Object[],Observable<R>> toAsyncArray(Function<? super Object[],? extends R> func, Scheduler scheduler)
Scheduler
toAsync
works on.R
- the result typefunc
- the function to convertscheduler
- the Scheduler used to call the func
func
and emits its returned valuepublic static <T> Observable<T> startFuture(Supplier<? extends Future<? extends T>> functionAsync)
Important note subscribing to the resulting Observable blocks until the future completes.
startFuture
by default operates on the computation
Scheduler
.T
- the result typefunctionAsync
- the asynchronous function to runstartFuture(Supplier, Scheduler)
,
RxJava Wiki: startFuture()public static <T> Observable<T> startFuture(Supplier<? extends Future<? extends T>> functionAsync, Scheduler scheduler)
Scheduler
startFuture
works on.T
- the result typefunctionAsync
- the asynchronous function to runscheduler
- the Scheduler where the completion of the Future is awaitedpublic static <T> Observable<T> deferFuture(Supplier<? extends Future<? extends ObservableSource<? extends T>>> publisherFactoryAsync)
Important note subscribing to the resulting Observable blocks until the future completes.
deferFuture
by default operates on the computation
Scheduler
.T
- the result typepublisherFactoryAsync
- the asynchronous function to start for each observerdeferFuture(Supplier, Scheduler)
,
RxJava Wiki: deferFuture()public static <T> Observable<T> deferFuture(Supplier<? extends Future<? extends ObservableSource<? extends T>>> publisherFactoryAsync, Scheduler scheduler)
Scheduler
deferFuture
works on.T
- the result typepublisherFactoryAsync
- the asynchronous function to start for each observerscheduler
- the Scheduler where the completion of the Future is awaitedpublic static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext)
Important note: The returned task blocks indefinitely unless the run()
method is called
or the task is scheduled on an Executor.
forEachFuture
by default operates on the computation
Scheduler
.T
- the source value typesource
- the source ObservableSourceonNext
- the action to call with each emitted elementforEachFuture(ObservableSource, Consumer, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext, Consumer<? super Throwable> onError)
Important note: The returned task blocks indefinitely unless the run()
method is called
or the task is scheduled on an Executor.
forEachFuture
by default operates on the computation
Scheduler
.T
- the source value typesource
- the source ObservableSourceonNext
- the action to call with each emitted elementonError
- the action to call when an exception is emittedforEachFuture(ObservableSource, Consumer, Consumer, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete)
Important note: The returned task blocks indefinitely unless the run()
method is called
or the task is scheduled on an Executor.
forEachFuture
by default operates on the computation
Scheduler
.T
- the source value typesource
- the source ObservableSourceonNext
- the action to call with each emitted elementonError
- the action to call when an exception is emittedonComplete
- the action to call when the source completesforEachFuture(ObservableSource, Consumer, Consumer, Action, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext, Scheduler scheduler)
Scheduler
forEachFuture
works on.T
- the source value typesource
- the source ObservableonNext
- the action to call with each emitted elementscheduler
- the Scheduler where the task will await the termination of the for-eachpublic static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Scheduler scheduler)
Scheduler
forEachFuture
works on.T
- the source value typesource
- the source ObservableSourceonNext
- the action to call with each emitted elementonError
- the action to call when an exception is emittedscheduler
- the Scheduler where the task will await the termination of the for-eachpublic static <T> Future<Object> forEachFuture(ObservableSource<? extends T> source, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete, Scheduler scheduler)
Scheduler
forEachFuture
works on.T
- the source value typesource
- the source ObservableonNext
- the action to call with each emitted elementonError
- the action to call when an exception is emittedonComplete
- the action to call when the source completesscheduler
- the Scheduler where the task will await the termination of the for-eachpublic static <T> DisposableObservable<T> runAsync(Scheduler scheduler, BiConsumer<? super Observer<? super T>,? super Disposable> action)
Scheduler
forEachFuture
works on.T
- the output value typescheduler
- the Scheduler where the action is executedaction
- the action to execute, receives a Subscriber where the events can be pumped and a
Disposable which lets it check for cancellation conditionpublic static <T> DisposableObservable<T> runAsync(Scheduler scheduler, Subject<T> subject, BiConsumer<? super Observer<? super T>,? super Disposable> action)
Scheduler
forEachFuture
works on.T
- the output value of the actionscheduler
- the Scheduler where the action is executedsubject
- the subject to use to distribute values emitted by the actionaction
- the action to execute, receives a Subscriber where the events can be pumped and a
Disposable which lets it check for cancellation condition