/** * Returns a Completable which calls the given onError callback if this Completable emits an error. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnError} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onError the error callback * @return the new Completable instance * @throws NullPointerException if onError is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnError(Consumer<? super Throwable> onError) { return doOnLifecycle(Functions.emptyConsumer(), onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable which calls the given onError callback if this Completable emits an error. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnError} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onError the error callback * @return the new Completable instance * @throws NullPointerException if onError is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnError(Consumer<? super Throwable> onError) { return doOnLifecycle(Functions.emptyConsumer(), onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable instance that calls the given onSubscribe callback with the disposable * that child subscribers receive on subscription. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onSubscribe the callback called when a child subscriber subscribes * @return the new Completable instance * @throws NullPointerException if onSubscribe is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnSubscribe(Consumer<? super Disposable> onSubscribe) { return doOnLifecycle(onSubscribe, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable instance that calls the given onSubscribe callback with the disposable * that child subscribers receive on subscription. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onSubscribe the callback called when a child subscriber subscribes * @return the new Completable instance * @throws NullPointerException if onSubscribe is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnSubscribe(Consumer<? super Disposable> onSubscribe) { return doOnLifecycle(onSubscribe, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable which calls the given onComplete callback if this Completable completes. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnComplete} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onComplete the callback to call when this emits an onComplete event * @return the new Completable instance * @throws NullPointerException if onComplete is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnComplete(Action onComplete) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), onComplete, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable instance that calls the given onTerminate callback just before this Completable * completes normally or with an exception * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnTerminate} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onTerminate the callback to call just before this Completable terminates * @return the new Completable instance */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnTerminate(final Action onTerminate) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, onTerminate, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable which calls the given onComplete callback if this Completable completes. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnComplete} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onComplete the callback to call when this emits an onComplete event * @return the new Completable instance * @throws NullPointerException if onComplete is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnComplete(Action onComplete) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), onComplete, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Calls the shared {@code Action} if a CompletableObserver subscribed to the current * Completable disposes the common Disposable it received via onSubscribe. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnDispose} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onDispose the action to call when the child subscriber disposes the subscription * @return the new Completable instance * @throws NullPointerException if onDispose is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnDispose(Action onDispose) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onDispose); }
/** * Returns a Completable instance that calls the given onTerminate callback just before this Completable * completes normally or with an exception * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnTerminate} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onTerminate the callback to call just before this Completable terminates * @return the new Completable instance */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnTerminate(final Action onTerminate) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, onTerminate, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION); }
/** * Returns a Completable which calls the given onDispose callback if the child subscriber cancels * the subscription. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doOnDispose} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onDispose the callback to call when the child subscriber disposes the subscription * @return the new Completable instance * @throws NullPointerException if onDispose is null */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnDispose(Action onDispose) { return doOnLifecycle(Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onDispose); }
/** * Returns a Completable instance that calls the given onTerminate callback after this Completable * completes normally or with an exception * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doAfterTerminate} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onAfterTerminate the callback to call after this Completable terminates * @return the new Completable instance */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doAfterTerminate(final Action onAfterTerminate) { return doOnLifecycle( Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onAfterTerminate, Functions.EMPTY_ACTION); } /**
/** * Returns a Completable instance that calls the given onTerminate callback after this Completable * completes normally or with an exception * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code doAfterTerminate} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onAfterTerminate the callback to call after this Completable terminates * @return the new Completable instance */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doAfterTerminate(final Action onAfterTerminate) { return doOnLifecycle( Functions.emptyConsumer(), Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onAfterTerminate, Functions.EMPTY_ACTION); } /**