/** * Executes a callback when the upstream calls onSubscribe. * @param onSubscribe the consumer called with the upstream Subscription * @return the new Nolo instance */ public final Nono doOnSubscribe(Consumer<? super Subscription> onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onSubscribe, Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes a callback when the upstream signals an error. * @param onError the consumer called before the error is emitted to * the downstream * @return the new Nolo instance */ public final Nono doOnError(Consumer<? super Throwable> onError) { ObjectHelper.requireNonNull(onError, "onError is null"); return onAssembly(new NonoDoOnLifecycle(this, onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes a callback when the upstream calls onSubscribe. * @param onSubscribe the consumer called with the upstream Subscription * @return the new Nolo instance */ public final Nono doOnSubscribe(Consumer<? super Subscription> onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, onSubscribe, Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes a callback when the upstream signals an error. * @param onError the consumer called before the error is emitted to * the downstream * @return the new Nolo instance */ public final Nono doOnError(Consumer<? super Throwable> onError) { ObjectHelper.requireNonNull(onError, "onError is null"); return onAssembly(new NonoDoOnLifecycle(this, onError, Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes the callback when the downstream requests from this Nolo. * @param onRequest the callback called with the request amount * @return the new Nolo instance */ public final Nono doOnRequest(LongConsumer onRequest) { ObjectHelper.requireNonNull(onRequest, "onRequest is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), onRequest, Functions.EMPTY_ACTION )); }
/** * Executes the callback if the downstream cancels the sequence. * @param onCancel the action to call * @return the new Nono instance */ public final Nono doOnCancel(Action onCancel) { ObjectHelper.requireNonNull(onCancel, "action is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, onCancel )); }
/** * Executes the callback when the downstream requests from this Nolo. * @param onRequest the callback called with the request amount * @return the new Nolo instance */ public final Nono doOnRequest(LongConsumer onRequest) { ObjectHelper.requireNonNull(onRequest, "onRequest is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), onRequest, Functions.EMPTY_ACTION )); }
/** * Executes the callback after this Nono terminates and the downstream * is notified. * @param onAfterTerminate the callback to call after the downstream is notified * @return the new Nono instance */ public final Nono doAfterTerminate(Action onAfterTerminate) { ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, onAfterTerminate, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes the callback if the downstream cancels the sequence. * @param onCancel the action to call * @return the new Nono instance */ public final Nono doOnCancel(Action onCancel) { ObjectHelper.requireNonNull(onCancel, "action is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, onCancel )); }
/** * Executes a callback when the upstream completes normally. * @param onComplete the consumer called before the completion event * is emitted to the downstream. * @return the new Nolo instance */ public final Nono doOnComplete(Action onComplete) { ObjectHelper.requireNonNull(onComplete, "onComplete is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), onComplete, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes a callback when the upstream completes normally. * @param onComplete the consumer called before the completion event * is emitted to the downstream. * @return the new Nolo instance */ public final Nono doOnComplete(Action onComplete) { ObjectHelper.requireNonNull(onComplete, "onComplete is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), onComplete, Functions.EMPTY_ACTION, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }
/** * Executes the callback after this Nono terminates and the downstream * is notified. * @param onAfterTerminate the callback to call after the downstream is notified * @return the new Nono instance */ public final Nono doAfterTerminate(Action onAfterTerminate) { ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null"); return onAssembly(new NonoDoOnLifecycle(this, Functions.emptyConsumer(), Functions.EMPTY_ACTION, onAfterTerminate, Functions.emptyConsumer(), Functions.EMPTY_LONG_CONSUMER, Functions.EMPTY_ACTION )); }