public final class Completables extends Object
CompletableConverters,
use Completable.to(CompletableConverter)
to apply the operators to an existing sequence.CompletableTransformers| Modifier and Type | Method and Description |
|---|---|
static <R> CompletableConverter<Flowable<R>> |
flatMapFlowable(Supplier<? extends Publisher<? extends R>> onCompleteHandler,
Function<? super Throwable,? extends Publisher<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
Publishers and
subscribes to it, relaying its terminal events to the downstream. |
static <R> CompletableConverter<Maybe<R>> |
flatMapMaybe(Supplier<? extends MaybeSource<? extends R>> onCompleteHandler,
Function<? super Throwable,? extends MaybeSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
MaybeSources and
subscribes to it, relaying its terminal events to the downstream. |
static <R> CompletableConverter<Observable<R>> |
flatMapObservable(Supplier<? extends ObservableSource<? extends R>> onCompleteHandler,
Function<? super Throwable,? extends ObservableSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
ObservableSources and
subscribes to it, relaying its terminal events to the downstream. |
static <R> CompletableConverter<Single<R>> |
flatMapSingle(Supplier<? extends SingleSource<? extends R>> onCompleteHandler,
Function<? super Throwable,? extends SingleSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
SingleSources and
subscribes to it, relaying its terminal events to the downstream. |
public static <R> CompletableConverter<Maybe<R>> flatMapMaybe(Supplier<? extends MaybeSource<? extends R>> onCompleteHandler, Function<? super Throwable,? extends MaybeSource<? extends R>> onErrorHandler)
MaybeSources and
subscribes to it, relaying its terminal events to the downstream.R - the element type of the mapped-in MaybeSourceonCompleteHandler - called when the upstream completes normally and should return
the MaybeSource to continue with.onErrorHandler - called when the upstream fails and should return the
MaybeSource for the given Throwable instance to continue with.public static <R> CompletableConverter<Single<R>> flatMapSingle(Supplier<? extends SingleSource<? extends R>> onCompleteHandler, Function<? super Throwable,? extends SingleSource<? extends R>> onErrorHandler)
SingleSources and
subscribes to it, relaying its terminal events to the downstream.R - the element type of the mapped-in SingleSourceonCompleteHandler - called when the upstream completes normally and should return
the SingleSource to continue with.onErrorHandler - called when the upstream fails and should return the
SingleSource for the given Throwable instance to continue with.public static <R> CompletableConverter<Observable<R>> flatMapObservable(Supplier<? extends ObservableSource<? extends R>> onCompleteHandler, Function<? super Throwable,? extends ObservableSource<? extends R>> onErrorHandler)
ObservableSources and
subscribes to it, relaying its terminal events to the downstream.R - the element type of the mapped-in ObservableSourceonCompleteHandler - called when the upstream completes normally and should return
the SingleSource to continue with.onErrorHandler - called when the upstream fails and should return the
ObservableSource for the given Throwable instance to continue with.public static <R> CompletableConverter<Flowable<R>> flatMapFlowable(Supplier<? extends Publisher<? extends R>> onCompleteHandler, Function<? super Throwable,? extends Publisher<? extends R>> onErrorHandler)
Publishers and
subscribes to it, relaying its terminal events to the downstream.R - the element type of the mapped-in ObservableSourceonCompleteHandler - called when the upstream completes normally and should return
the Publisher to continue with.onErrorHandler - called when the upstream fails and should return the
Publisher for the given Throwable instance to continue with.