@Override public void handle(AsyncResult<HttpServer> result) { if (result.succeeded()) { startedResult.setResult(null); } else { startedResult.setFailure(result.cause()); } } });
/** * Override this method to signify that start is complete sometime _after_ the start() method has returned * This is useful if your verticle deploys other verticles or modules and you don't want this verticle to * be considered started until the other modules and verticles have been started. * * @param startedResult When you are happy your verticle is started set the result */ @Override public void start(Future<Void> startedResult) { // Create the real verticle try { realVerticle = createRealVerticle(); } catch (Exception e) { startedResult.setFailure(e); return; } // Start the real verticle realVerticle.start(startedResult); }
/** * Override this method to signify that start is complete sometime _after_ the start() method has returned * This is useful if your verticle deploys other verticles or modules and you don't want this verticle to * be considered started until the other modules and verticles have been started. * @param startedResult When you are happy your verticle is started set the result */ public void start(Future<Void> startedResult) { start(); startedResult.setResult(null); }
@Override public void handle(AsyncResult<Void> result) { if (result.failed()) { future.setFailure(result.cause()); } else { vertx.eventBus().registerHandler(String.format("%s.%s", cluster, group), groupHandler, new Handler<AsyncResult<Void>>() {
@Override public void handle(AsyncResult<HttpServer> ar) { if (!ar.succeeded()) { result.setFailure(ar.cause()); } else { result.setResult(null); } } });
.invoke(factory, vertx, container, manager, isHazelcast ? container.config().getInteger("quorum", 1) : 1, cluster, group, address); } catch (Exception e) { future.setFailure(e); return;