public final class AsyncFlowable extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Flowable<T> |
deferFuture(Supplier<? extends Future<? extends Publisher<? extends T>>> publisherFactoryAsync)
Returns an Observable that starts the specified asynchronous factory function whenever a new subscriber
subscribes.
|
static <T> Flowable<T> |
deferFuture(Supplier<? extends Future<? extends Publisher<? 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(Publisher<? 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(Publisher<? 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(Publisher<? 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(Publisher<? 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(Publisher<? 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(Publisher<? 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> DisposableFlowable<T> |
runAsync(Scheduler scheduler,
BiConsumer<? super Subscriber<? 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 DisposableFlowable.
|
static <T,U> DisposableFlowable<U> |
runAsync(Scheduler scheduler,
Processor<T,U> processor,
BiConsumer<? super Subscriber<? 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 DisposableFlowable.
|
static <T> Flowable<T> |
start(Supplier<? extends T> func)
Invokes the specified function asynchronously and returns an Flowable that emits the result.
|
static <T> Flowable<T> |
start(Supplier<? extends T> func,
Scheduler scheduler)
Invokes the specified function asynchronously on the specified Scheduler and returns an Flowable that
emits the result.
|
static <T> Flowable<T> |
startFuture(Supplier<? extends Future<? extends T>> functionAsync)
Invokes the asynchronous function immediately, surfacing the result through an Observable.
|
static <T> Flowable<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<Flowable<Object>> |
toAsync(Action action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static SimpleCallable<Flowable<Object>> |
toAsync(Action action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static <T1,T2> PlainBiFunction<T1,T2,Flowable<Object>> |
toAsync(BiConsumer<? super T1,? super T2> action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static <T1,T2> PlainBiFunction<T1,T2,Flowable<Object>> |
toAsync(BiConsumer<? super T1,? super T2> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static <T1,T2,R> PlainBiFunction<T1,T2,Flowable<R>> |
toAsync(BiFunction<? super T1,? super T2,? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <T1,T2,R> PlainBiFunction<T1,T2,Flowable<R>> |
toAsync(BiFunction<? super T1,? super T2,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <T1> PlainFunction<T1,Flowable<Object>> |
toAsync(Consumer<? super T1> action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static <T1> PlainFunction<T1,Flowable<Object>> |
toAsync(Consumer<? super T1> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
|
static <T1,T2,T3> PlainFunction3<T1,T2,T3,Flowable<Object>> |
toAsync(Consumer3<? super T1,? super T2,? super T3> action)
Convert a synchronous action call into an asynchronous function call through an Flowable.
|
static <T1,T2,T3> PlainFunction3<T1,T2,T3,Flowable<Object>> |
toAsync(Consumer3<? super T1,? super T2,? super T3> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
static <T1,R> PlainFunction<T1,Flowable<R>> |
toAsync(Function<? super T1,? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <T1,R> PlainFunction<T1,Flowable<R>> |
toAsync(Function<? super T1,? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
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 Flowable.
|
static PlainFunction<Object[],Flowable<Object>> |
toAsyncArray(Consumer<? super Object[]> action)
Convert a synchronous action call into an asynchronous function call through an Flowable.
|
static PlainFunction<Object[],Flowable<Object>> |
toAsyncArray(Consumer<? super Object[]> action,
Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Flowable.
|
static <R> PlainFunction<Object[],Flowable<R>> |
toAsyncArray(Function<? super Object[],? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Flowable.
|
static <R> PlainFunction<Object[],Flowable<R>> |
toAsyncArray(Function<? super Object[],? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Flowable.
|
static <R> SimpleCallable<Flowable<R>> |
toAsyncCallable(Callable<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <R> SimpleCallable<Flowable<R>> |
toAsyncCallable(Callable<? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <R> SimpleCallable<Flowable<R>> |
toAsyncSupplier(Supplier<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
static <R> SimpleCallable<Flowable<R>> |
toAsyncSupplier(Supplier<? extends R> func,
Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Flowable.
|
public static <T> Flowable<T> start(Supplier<? extends T> func)
Note: The function is called immediately and once, not whenever an observer subscribes to the resulting Flowable. Multiple subscriptions to this Flowable observe the same return value.
start
by default operates on the computation
Scheduler
.T
- the result value typefunc
- function to run asynchronouslypublic static <T> Flowable<T> start(Supplier<? extends T> func, Scheduler scheduler)
Note: The function is called immediately and once, not whenever an observer subscribes to the resulting Flowable. Multiple subscriptions to this Flowable 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<Flowable<Object>> toAsync(Action action)
toAsync
by default operates on the computation
Scheduler
.action
- the action to convertaction
and emits null
public static <R> SimpleCallable<Flowable<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<Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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[],Flowable<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[],Flowable<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<Flowable<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<Flowable<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<Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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,Flowable<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[],Flowable<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[],Flowable<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> Flowable<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> Flowable<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> Flowable<T> deferFuture(Supplier<? extends Future<? extends Publisher<? 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> Flowable<T> deferFuture(Supplier<? extends Future<? extends Publisher<? 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(Publisher<? 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 ObservableonNext
- the action to call with each emitted elementforEachFuture(Publisher, Consumer, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(Publisher<? 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 ObservableonNext
- the action to call with each emitted elementonError
- the action to call when an exception is emittedforEachFuture(Publisher, Consumer, Consumer, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(Publisher<? 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 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 completesforEachFuture(Publisher, Consumer, Consumer, Action, Scheduler)
,
RxJava Wiki: forEachFuture()public static <T> Future<Object> forEachFuture(Publisher<? 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(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super Throwable> onError, 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 emittedscheduler
- the Scheduler where the task will await the termination of the for-eachpublic static <T> Future<Object> forEachFuture(Publisher<? 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> DisposableFlowable<T> runAsync(Scheduler scheduler, BiConsumer<? super Subscriber<? 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,U> DisposableFlowable<U> runAsync(Scheduler scheduler, Processor<T,U> processor, BiConsumer<? super Subscriber<? super T>,? super Disposable> action)
Scheduler
forEachFuture
works on.T
- the output value of the actionU
- the output type of the observable sequencescheduler
- the Scheduler where the action is executedprocessor
- 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