@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Identifier"); table.column("Options"); getVertxService().deploymentIDs().forEach(id -> { Deployment deployment = ((VertxInternal)getVertxService()).getDeployment(id); Row row = table.addRow(); row.addContent(id, deployment.verticleIdentifier(), deployment.deploymentOptions().toJson()); } ); try { table.print(System.out); } catch (Throwable t) { System.err.println("FAILED to write table"); } return null; }
@Override public void start() throws Exception { vertx.runOnContext(v -> { List<String> extraCP = Arrays.asList("blah", "wibble"); DeploymentOptions expected = new DeploymentOptions().setConfig(new JsonObject().put("foo", "bar")) .setWorker(true).setIsolationGroup("mygroup").setExtraClasspath(extraCP); Deployment dep = ((VertxInternal) vertx).getDeployment(Vertx.currentContext().deploymentID()); vertx.eventBus().publish("moduleStarted", expected.equals(dep.deploymentOptions())); }); }