Class AsyncFlowable
- java.lang.Object
-
- hu.akarnokd.rxjava3.async.AsyncFlowable
-
public final class AsyncFlowable extends java.lang.ObjectUtility methods to convert functions and actions into asynchronous operations through the Publisher/Subscriber pattern.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Flowable<T>deferFuture(Supplier<? extends java.util.concurrent.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 java.util.concurrent.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> java.util.concurrent.Future<java.lang.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> java.util.concurrent.Future<java.lang.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> java.util.concurrent.Future<java.lang.Object>forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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> java.util.concurrent.Future<java.lang.Object>forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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> java.util.concurrent.Future<java.lang.Object>forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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> java.util.concurrent.Future<java.lang.Object>forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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> 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 java.util.concurrent.Future<? extends T>> functionAsync)Invokes the asynchronous function immediately, surfacing the result through an Observable.static <T> Flowable<T>startFuture(Supplier<? extends java.util.concurrent.Future<? extends T>> functionAsync, Scheduler scheduler)Invokes the asynchronous function immediately, surfacing the result through an Observable and waits on the specified Scheduler.static <T1,T2,T3>
PlainFunction3<T1,T2,T3,Flowable<java.lang.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<java.lang.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>
PlainFunction4<T1,T2,T3,T4,Flowable<java.lang.Object>>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>
PlainFunction4<T1,T2,T3,T4,Flowable<java.lang.Object>>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>
PlainFunction5<T1,T2,T3,T4,T5,Flowable<java.lang.Object>>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>
PlainFunction5<T1,T2,T3,T4,T5,Flowable<java.lang.Object>>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>
PlainFunction6<T1,T2,T3,T4,T5,T6,Flowable<java.lang.Object>>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>
PlainFunction6<T1,T2,T3,T4,T5,T6,Flowable<java.lang.Object>>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>
PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Flowable<java.lang.Object>>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>
PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Flowable<java.lang.Object>>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>
PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Flowable<java.lang.Object>>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>
PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Flowable<java.lang.Object>>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>
PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Flowable<java.lang.Object>>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>
PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Flowable<java.lang.Object>>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 SimpleCallable<Flowable<java.lang.Object>>toAsync(Action action)Convert a synchronous action call into an asynchronous function call through a Flowable.static SimpleCallable<Flowable<java.lang.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<java.lang.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<java.lang.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<java.lang.Object>>toAsync(Consumer<? super T1> action)Convert a synchronous action call into an asynchronous function call through a Flowable.static <T1> PlainFunction<T1,Flowable<java.lang.Object>>toAsync(Consumer<? super T1> action, Scheduler scheduler)Convert a synchronous action call into an asynchronous function call through a 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>
PlainFunction3<T1,T2,T3,Flowable<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>
PlainFunction3<T1,T2,T3,Flowable<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>
PlainFunction4<T1,T2,T3,T4,Flowable<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>
PlainFunction4<T1,T2,T3,T4,Flowable<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>
PlainFunction5<T1,T2,T3,T4,T5,Flowable<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>
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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.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)Convert a synchronous function call into an asynchronous function call through an Flowable.static PlainFunction<java.lang.Object[],Flowable<java.lang.Object>>toAsyncArray(Consumer<? super java.lang.Object[]> action)Convert a synchronous action call into an asynchronous function call through an Flowable.static PlainFunction<java.lang.Object[],Flowable<java.lang.Object>>toAsyncArray(Consumer<? super java.lang.Object[]> action, Scheduler scheduler)Convert a synchronous action call into an asynchronous function call through an Flowable.static <R> PlainFunction<java.lang.Object[],Flowable<R>>toAsyncArray(Function<? super java.lang.Object[],? extends R> func)Convert a synchronous function call into an asynchronous function call through an Flowable.static <R> PlainFunction<java.lang.Object[],Flowable<R>>toAsyncArray(Function<? super java.lang.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(java.util.concurrent.Callable<? extends R> func)Convert a synchronous function call into an asynchronous function call through a Flowable.static <R> SimpleCallable<Flowable<R>>toAsyncCallable(java.util.concurrent.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.
-
-
-
Method Detail
-
start
public static <T> Flowable<T> start(Supplier<? extends T> func)
Invokes the specified function asynchronously and returns an Flowable that emits the result.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.
- Backpressure:
- The returned Flowable honors downstream backpressure.
- Scheduler:
startby default operates on thecomputationScheduler.
- Type Parameters:
T- the result value type- Parameters:
func- function to run asynchronously- Returns:
- an Flowable that emits the function's result value, or notifies observers of an exception
- See Also:
- RxJava Wiki: start(), MSDN: Observable.Start
-
start
public 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.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.
- Backpressure:
- The returned Flowable honors downstream backpressure.
- Scheduler:
- You specify the
Schedulerstartworks on.
- Type Parameters:
T- the result value type- Parameters:
func- function to run asynchronouslyscheduler- Scheduler to run the function on- Returns:
- an Flowable that emits the function's result value, or notifies observers of an exception
- See Also:
- RxJava Wiki: start(), MSDN: Observable.Start
-
toAsync
public static SimpleCallable<Flowable<java.lang.Object>> toAsync(Action action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncCallable
public static <R> SimpleCallable<Flowable<R>> toAsyncCallable(java.util.concurrent.Callable<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
toAsyncCallableby default operates on thecomputationScheduler.
- Type Parameters:
R- the result value type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncSupplier
public static <R> SimpleCallable<Flowable<R>> toAsyncSupplier(Supplier<? extends R> func)
Convert a synchronous function call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
toAsyncSupplierby default operates on thecomputationScheduler.
- Type Parameters:
R- the result value type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1> PlainFunction<T1,Flowable<java.lang.Object>> toAsync(Consumer<? super T1> action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- first parameter type of the action- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- first parameter type of the actionR- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2> PlainBiFunction<T1,T2,Flowable<java.lang.Object>> toAsync(BiConsumer<? super T1,? super T2> action)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter type- Parameters:
action- the action to convert- Returns:
- a function that returns a Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeR- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns a Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3> PlainFunction3<T1,T2,T3,Flowable<java.lang.Object>> toAsync(Consumer3<? super T1,? super T2,? super T3> action)
Convert a synchronous action call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,R> PlainFunction3<T1,T2,T3,Flowable<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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeR- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4> PlainFunction4<T1,T2,T3,T4,Flowable<java.lang.Object>> toAsync(Consumer4<? super T1,? super T2,? super T3,? super T4> action)
Convert a synchronous action call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeR- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5> PlainFunction5<T1,T2,T3,T4,T5,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter typeR- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6> PlainFunction6<T1,T2,T3,T4,T5,T6,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter typeT6- the sixth parameter type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7,T8> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncby default operates on thecomputationScheduler.
- Type Parameters:
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 type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncArray
public static PlainFunction<java.lang.Object[],Flowable<java.lang.Object>> toAsyncArray(Consumer<? super java.lang.Object[]> action)
Convert a synchronous action call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncArrayby default operates on thecomputationScheduler.
- Parameters:
action- the action to convert- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync()
-
toAsyncArray
public static <R> PlainFunction<java.lang.Object[],Flowable<R>> toAsyncArray(Function<? super java.lang.Object[],? extends R> func)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the function honors downstream backpressure.
- Scheduler:
toAsyncArrayby default operates on thecomputationScheduler.
- Type Parameters:
R- the result type- Parameters:
func- the function to convert- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync()
-
toAsync
public static SimpleCallable<Flowable<java.lang.Object>> toAsync(Action action, Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emits an Object - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncCallable
public static <R> SimpleCallable<Flowable<R>> toAsyncCallable(java.util.concurrent.Callable<? extends R> func, Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncCallableworks on.
- Type Parameters:
R- the result value type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncSupplier
public 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.
- Backpressure:
- The Flowable returned by the SimpleCallable honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncSupplierworks on.
- Type Parameters:
R- the result value type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1> PlainFunction<T1,Flowable<java.lang.Object>> toAsync(Consumer<? super T1> action, Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- first parameter type of the action- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- first parameter type of the actionR- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2> PlainBiFunction<T1,T2,Flowable<java.lang.Object>> toAsync(BiConsumer<? super T1,? super T2> action, Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through a Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns a Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeR- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns a Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3> PlainFunction3<T1,T2,T3,Flowable<java.lang.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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeR- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4> PlainFunction4<T1,T2,T3,T4,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeR- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5> PlainFunction5<T1,T2,T3,T4,T5,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter typeR- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6> PlainFunction6<T1,T2,T3,T4,T5,T6,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
T1- the first parameter typeT2- the second parameter typeT3- the third parameter typeT4- the fourth parameter typeT5- the fifth parameter typeT6- the sixth parameter type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7> PlainFunction7<T1,T2,T3,T4,T5,T6,T7,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7,T8> PlainFunction8<T1,T2,T3,T4,T5,T6,T7,T8,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> PlainFunction9<T1,T2,T3,T4,T5,T6,T7,T8,T9,Flowable<java.lang.Object>> 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.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsync
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)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
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 type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync(), MSDN: Observable.ToAsync
-
toAsyncArray
public static PlainFunction<java.lang.Object[],Flowable<java.lang.Object>> toAsyncArray(Consumer<? super java.lang.Object[]> action, Scheduler scheduler)
Convert a synchronous action call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Parameters:
action- the action to convertscheduler- the Scheduler used to execute theaction- Returns:
- a function that returns an Flowable that executes the
actionand emitsnull - See Also:
- RxJava Wiki: toAsync()
-
toAsyncArray
public static <R> PlainFunction<java.lang.Object[],Flowable<R>> toAsyncArray(Function<? super java.lang.Object[],? extends R> func, Scheduler scheduler)
Convert a synchronous function call into an asynchronous function call through an Flowable.
- Backpressure:
- The Flowable returned by the Function honors downstream backpressure.
- Scheduler:
- You specify the
SchedulertoAsyncworks on.
- Type Parameters:
R- the result type- Parameters:
func- the function to convertscheduler- the Scheduler used to call thefunc- Returns:
- a function that returns an Flowable that executes the
funcand emits its returned value - See Also:
- RxJava Wiki: toAsync()
-
startFuture
public static <T> Flowable<T> startFuture(Supplier<? extends java.util.concurrent.Future<? extends T>> functionAsync)
Invokes the asynchronous function immediately, surfacing the result through an Observable.Important note subscribing to the resulting Observable blocks until the future completes.
- Backpressure:
- The Flowable returned honors downstream backpressure.
- Scheduler:
startFutureby default operates on thecomputationScheduler.
- Type Parameters:
T- the result type- Parameters:
functionAsync- the asynchronous function to run- Returns:
- an Observable that surfaces the result of the future
- See Also:
startFuture(Supplier, Scheduler), RxJava Wiki: startFuture()
-
startFuture
public static <T> Flowable<T> startFuture(Supplier<? extends java.util.concurrent.Future<? extends T>> functionAsync, Scheduler scheduler)
Invokes the asynchronous function immediately, surfacing the result through an Observable and waits on the specified Scheduler.
- Backpressure:
- The Flowable returned honors downstream backpressure.
- Scheduler:
- You specify the
SchedulerstartFutureworks on.
- Type Parameters:
T- the result type- Parameters:
functionAsync- the asynchronous function to runscheduler- the Scheduler where the completion of the Future is awaited- Returns:
- an Observable that surfaces the result of the future
- See Also:
- RxJava Wiki: startFuture()
-
deferFuture
public static <T> Flowable<T> deferFuture(Supplier<? extends java.util.concurrent.Future<? extends Publisher<? extends T>>> publisherFactoryAsync)
Returns an Observable that starts the specified asynchronous factory function whenever a new subscriber subscribes.Important note subscribing to the resulting Observable blocks until the future completes.
- Backpressure:
- The Flowable returned honors downstream backpressure.
- Scheduler:
deferFutureby default operates on thecomputationScheduler.
- Type Parameters:
T- the result type- Parameters:
publisherFactoryAsync- the asynchronous function to start for each observer- Returns:
- the Observable emitting items produced by the asynchronous observer produced by the factory
- See Also:
deferFuture(Supplier, Scheduler), RxJava Wiki: deferFuture()
-
deferFuture
public static <T> Flowable<T> deferFuture(Supplier<? extends java.util.concurrent.Future<? extends Publisher<? extends T>>> publisherFactoryAsync, Scheduler scheduler)
Returns an Observable that starts the specified asynchronous factory function whenever a new subscriber subscribes.
- Backpressure:
- The Flowable returned honors downstream backpressure.
- Scheduler:
- You specify the
SchedulerdeferFutureworks on.
- Type Parameters:
T- the result type- Parameters:
publisherFactoryAsync- the asynchronous function to start for each observerscheduler- the Scheduler where the completion of the Future is awaited- Returns:
- the Observable emitting items produced by the asynchronous observer produced by the factory
- See Also:
- RxJava Wiki: deferFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.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.Important note: The returned task blocks indefinitely unless the
run()method is called or the task is scheduled on an Executor.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
forEachFutureby default operates on thecomputationScheduler.
- Type Parameters:
T- the source value type- Parameters:
source- the source ObservableonNext- the action to call with each emitted element- Returns:
- the Future representing the entire for-each operation
- See Also:
forEachFuture(Publisher, Consumer, Scheduler), RxJava Wiki: forEachFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.Object> forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.Throwable> onError)
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion or error through a Future.Important note: The returned task blocks indefinitely unless the
run()method is called or the task is scheduled on an Executor.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
forEachFutureby default operates on thecomputationScheduler.
- Type Parameters:
T- the source value type- Parameters:
source- the source ObservableonNext- the action to call with each emitted elementonError- the action to call when an exception is emitted- Returns:
- the Future representing the entire for-each operation
- See Also:
forEachFuture(Publisher, Consumer, Consumer, Scheduler), RxJava Wiki: forEachFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.Object> forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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.Important note: The returned task blocks indefinitely unless the
run()method is called or the task is scheduled on an Executor.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
forEachFutureby default operates on thecomputationScheduler.
- Type Parameters:
T- the source value type- Parameters:
source- 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 completes- Returns:
- the Future representing the entire for-each operation
- See Also:
forEachFuture(Publisher, Consumer, Consumer, Action, Scheduler), RxJava Wiki: forEachFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.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.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
- You specify the
SchedulerforEachFutureworks on.
- Type Parameters:
T- the source value type- Parameters:
source- the source ObservableonNext- the action to call with each emitted elementscheduler- the Scheduler where the task will await the termination of the for-each- Returns:
- the Future representing the entire for-each operation
- See Also:
- RxJava Wiki: forEachFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.Object> forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
- You specify the
SchedulerforEachFutureworks on.
- Type Parameters:
T- the source value type- Parameters:
source- 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-each- Returns:
- the Future representing the entire for-each operation
- See Also:
- RxJava Wiki: forEachFuture()
-
forEachFuture
public static <T> java.util.concurrent.Future<java.lang.Object> forEachFuture(Publisher<? extends T> source, Consumer<? super T> onNext, Consumer<? super java.lang.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.
- Backpressure:
- The input Publisher is consumed in an unbounded manner.
- Scheduler:
- You specify the
SchedulerforEachFutureworks on.
- Type Parameters:
T- the source value type- Parameters:
source- 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-each- Returns:
- the Future representing the entire for-each operation
- See Also:
- RxJava Wiki: forEachFuture()
-
runAsync
public 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. The action is immediately executed and unobserved values will be lost.- Backpressure:
- The resulting Flowable signals MissingBackpressureException if the downstream can't keep up.
- Scheduler:
- You specify the
SchedulerforEachFutureworks on.
- Type Parameters:
T- the output value type- Parameters:
scheduler- 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 condition- Returns:
- an DisposableFlowable that provides a Disposable interface to cancel the action
- See Also:
- RxJava Wiki: runAsync()
-
runAsync
public 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. The action is immediately executed and unobserved values might be lost, depending on the Subject type used.- Backpressure:
- The provided Processor's backpressure behavior determines the returned Flowable's backpressure behavior.
- Scheduler:
- You specify the
SchedulerforEachFutureworks on.
- Type Parameters:
T- the output value of the actionU- the output type of the observable sequence- Parameters:
scheduler- 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- Returns:
- an DisposableFlowable that provides a Disposable interface to cancel the action
- See Also:
- RxJava Wiki: runAsync()
-
-