public final class SingleTransformers
extends java.lang.Object
SingleTransformer,
use Single.compose(SingleTransformer)
to apply the operators to an existing sequence.Singles| Modifier and Type | Method and Description |
|---|---|
static <T,R> io.reactivex.SingleTransformer<T,R> |
flatMap(io.reactivex.functions.Function<? super T,? extends io.reactivex.SingleSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.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 <T,R> io.reactivex.SingleTransformer<T,R> flatMap(io.reactivex.functions.Function<? super T,? extends io.reactivex.SingleSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.SingleSource<? extends R>> onErrorHandler)
SingleSources and
subscribes to it, relaying its terminal events to the downstream.T - the success type of the upstreamR - the success type of the resulting MaybeonSuccessHandler - a function called with the upstream success value and should
return a SingleSource to continue with.onErrorHandler - called when the upstream fails and should return the
SingleSource for the given Throwable instance to continue with.