/** * Handles a failure of this Future by returning the result of another Future. * If the mapper fails, then the returned future will be failed with this failure. * @param mapper A function which takes the exception of a failure and returns a new future. * @return A recovered future */ public io.vertx.rxjava.core.Future<Boolean> recover(Function<Throwable, io.vertx.rxjava.core.Future<Boolean>> mapper) { io.vertx.rxjava.core.Future<Boolean> ret = io.vertx.rxjava.core.Future.newInstance(delegate.recover(new java.util.function.Function<java.lang.Throwable,io.vertx.core.Future<java.lang.Boolean>>() { public io.vertx.core.Future<java.lang.Boolean> apply(java.lang.Throwable arg) { io.vertx.rxjava.core.Future<Boolean> ret = mapper.apply(arg); return ret.getDelegate(); } }), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Handles a failure of this Future by returning the result of another Future. * If the mapper fails, then the returned future will be failed with this failure. * @param mapper A function which takes the exception of a failure and returns a new future. * @return A recovered future */ public io.vertx.rxjava.core.Future<Boolean> recover(Function<Throwable, io.vertx.rxjava.core.Future<Boolean>> mapper) { io.vertx.rxjava.core.Future<Boolean> ret = io.vertx.rxjava.core.Future.newInstance(delegate.recover(new java.util.function.Function<java.lang.Throwable,io.vertx.core.Future<java.lang.Boolean>>() { public io.vertx.core.Future<java.lang.Boolean> apply(java.lang.Throwable arg) { io.vertx.rxjava.core.Future<Boolean> ret = mapper.apply(arg); return ret.getDelegate(); } }), io.vertx.lang.rx.TypeArg.unknown()); return ret; }