public final class Completables extends Object
CompletableConverter
s,
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
Publisher s 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
MaybeSource s 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
ObservableSource s 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
SingleSource s 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)
MaybeSource
s 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)
SingleSource
s 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)
ObservableSource
s 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)
Publisher
s 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.