/** * Compose this future with a provided <code>next</code> future.<p> * * When this (the one on which <code>compose</code> is called) future succeeds, the <code>handler</code> will be called with * the completed value, this handler should complete the next future.<p> * * If the <code>handler</code> throws an exception, the returned future will be failed with this exception.<p> * * When this future fails, the failure will be propagated to the <code>next</code> future and the <code>handler</code> * will not be called. * @param handler the handler * @param next the next future * @return the next future, used for chaining */ public <U> io.vertx.rxjava.core.Future<U> compose(Handler<Boolean> handler, io.vertx.rxjava.core.Future<U> next) { io.vertx.rxjava.core.Future<U> ret = io.vertx.rxjava.core.Future.newInstance(delegate.compose(handler, next.getDelegate()), next.__typeArg_0); return ret; }
/** * Compose this future with a provided <code>next</code> future.<p> * * When this (the one on which <code>compose</code> is called) future succeeds, the <code>handler</code> will be called with * the completed value, this handler should complete the next future.<p> * * If the <code>handler</code> throws an exception, the returned future will be failed with this exception.<p> * * When this future fails, the failure will be propagated to the <code>next</code> future and the <code>handler</code> * will not be called. * @param handler the handler * @param next the next future * @return the next future, used for chaining */ public <U> io.vertx.rxjava.core.Future<U> compose(Handler<Boolean> handler, io.vertx.rxjava.core.Future<U> next) { io.vertx.rxjava.core.Future<U> ret = io.vertx.rxjava.core.Future.newInstance(delegate.compose(handler, next.getDelegate()), next.__typeArg_0); return ret; }
/** * Compose this future with a <code>mapper</code> function.<p> * * When this future (the one on which <code>compose</code> is called) succeeds, the <code>mapper</code> will be called with * the completed value and this mapper returns another future object. This returned future completion will complete * the future returned by this method call.<p> * * If the <code>mapper</code> throws an exception, the returned future will be failed with this exception.<p> * * When this future fails, the failure will be propagated to the returned future and the <code>mapper</code> * will not be called. * @param mapper the mapper function * @return the composed future */ public <U> io.vertx.rxjava.core.Future<U> compose(Function<Boolean, io.vertx.rxjava.core.Future<U>> mapper) { io.vertx.rxjava.core.Future<U> ret = io.vertx.rxjava.core.Future.newInstance(delegate.compose(new java.util.function.Function<java.lang.Boolean,io.vertx.core.Future<U>>() { public io.vertx.core.Future<U> apply(java.lang.Boolean arg) { io.vertx.rxjava.core.Future<U> ret = mapper.apply(arg); return ret.getDelegate(); } }), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Compose this future with a <code>mapper</code> function.<p> * * When this future (the one on which <code>compose</code> is called) succeeds, the <code>mapper</code> will be called with * the completed value and this mapper returns another future object. This returned future completion will complete * the future returned by this method call.<p> * * If the <code>mapper</code> throws an exception, the returned future will be failed with this exception.<p> * * When this future fails, the failure will be propagated to the returned future and the <code>mapper</code> * will not be called. * @param mapper the mapper function * @return the composed future */ public <U> io.vertx.rxjava.core.Future<U> compose(Function<Boolean, io.vertx.rxjava.core.Future<U>> mapper) { io.vertx.rxjava.core.Future<U> ret = io.vertx.rxjava.core.Future.newInstance(delegate.compose(new java.util.function.Function<java.lang.Boolean,io.vertx.core.Future<U>>() { public io.vertx.core.Future<U> apply(java.lang.Boolean arg) { io.vertx.rxjava.core.Future<U> ret = mapper.apply(arg); return ret.getDelegate(); } }), io.vertx.lang.rx.TypeArg.unknown()); return ret; }