/** * Create a {@link FutureCallback} from an Effect to be run if there is a * success. * * @param effect To be passed the produced value if it happens * @return The FutureCallback with a no-op onFailure */ public static <A> FutureCallback<A> onSuccessDo(final Effect<? super A> effect) { return futureCallback(effect, Effects.<Throwable> noop()); }
/** * Create a {@link FutureCallback} from an Effect to be run if there is a * failure. * * @param effect To be passed an exception if it happens * @return The FutureCallback with a no-op onSuccess */ public static <A> FutureCallback<A> onFailureDo(final Effect<Throwable> effect) { return futureCallback(Effects.<A> noop(), effect); }