Package hu.akarnokd.rxjava3.operators
Class Completables
- java.lang.Object
-
- hu.akarnokd.rxjava3.operators.Completables
-
public final class Completables extends java.lang.ObjectAdditional operators in the form ofCompletableConverters, useCompletable.to(CompletableConverter)to apply the operators to an existing sequence.- Since:
- 0.20.2
- See Also:
CompletableTransformers
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R> CompletableConverter<Flowable<R>>flatMapFlowable(Supplier<? extends Publisher<? extends R>> onCompleteHandler, Function<? super java.lang.Throwable,? extends Publisher<? extends R>> onErrorHandler)Maps the terminal signals of the upstream intoPublishers 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 java.lang.Throwable,? extends MaybeSource<? extends R>> onErrorHandler)Maps the terminal signals of the upstream intoMaybeSources 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 java.lang.Throwable,? extends ObservableSource<? extends R>> onErrorHandler)Maps the terminal signals of the upstream intoObservableSources 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 java.lang.Throwable,? extends SingleSource<? extends R>> onErrorHandler)Maps the terminal signals of the upstream intoSingleSources and subscribes to it, relaying its terminal events to the downstream.
-
-
-
Method Detail
-
flatMapMaybe
public static <R> CompletableConverter<Maybe<R>> flatMapMaybe(Supplier<? extends MaybeSource<? extends R>> onCompleteHandler, Function<? super java.lang.Throwable,? extends MaybeSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream intoMaybeSources and subscribes to it, relaying its terminal events to the downstream.- Type Parameters:
R- the element type of the mapped-in MaybeSource- Parameters:
onCompleteHandler- 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.- Returns:
- the new CompletableConverter instance
- Since:
- 0.20.2
-
flatMapSingle
public static <R> CompletableConverter<Single<R>> flatMapSingle(Supplier<? extends SingleSource<? extends R>> onCompleteHandler, Function<? super java.lang.Throwable,? extends SingleSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream intoSingleSources and subscribes to it, relaying its terminal events to the downstream.- Type Parameters:
R- the element type of the mapped-in SingleSource- Parameters:
onCompleteHandler- 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.- Returns:
- the new CompletableConverter instance
- Since:
- 0.20.2
-
flatMapObservable
public static <R> CompletableConverter<Observable<R>> flatMapObservable(Supplier<? extends ObservableSource<? extends R>> onCompleteHandler, Function<? super java.lang.Throwable,? extends ObservableSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream intoObservableSources and subscribes to it, relaying its terminal events to the downstream.- Type Parameters:
R- the element type of the mapped-in ObservableSource- Parameters:
onCompleteHandler- 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.- Returns:
- the new CompletableConverter instance
- Since:
- 0.20.2
-
flatMapFlowable
public static <R> CompletableConverter<Flowable<R>> flatMapFlowable(Supplier<? extends Publisher<? extends R>> onCompleteHandler, Function<? super java.lang.Throwable,? extends Publisher<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream intoPublishers and subscribes to it, relaying its terminal events to the downstream.- Type Parameters:
R- the element type of the mapped-in ObservableSource- Parameters:
onCompleteHandler- 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.- Returns:
- the new CompletableConverter instance
- Since:
- 0.20.2
-
-