Class CompletableTransformers

    • Method Detail

      • flatMap

        public static CompletableTransformer flatMap​(Supplier<? extends CompletableSource> onCompleteHandler,
                                                     Function<? super java.lang.Throwable,​? extends CompletableSource> onErrorHandler)
        Maps the terminal signals of the upstream into CompletableSources and subscribes to it, relaying its terminal events to the downstream.
        Parameters:
        onCompleteHandler - called when the upstream completes normally and should return the CompletableSource to continue with.
        onErrorHandler - called when the upstream fails and should return the CompletableSource for the given Throwable instance to continue with.
        Returns:
        the new CompletableTransformer instance
        Since:
        0.20.2