List of usage examples for io.vertx.core.net NetServer listen
Future<NetServer> listen(SocketAddress localAddress);
From source file:examples.CoreExamples.java
License:Open Source License
public void exampleFutureAll1(HttpServer httpServer, NetServer netServer) { Future<HttpServer> httpServerFuture = Future.future(); httpServer.listen(httpServerFuture.completer()); Future<NetServer> netServerFuture = Future.future(); netServer.listen(netServerFuture.completer()); CompositeFuture.all(httpServerFuture, netServerFuture).setHandler(ar -> { if (ar.succeeded()) { // All servers started } else {/*from w w w. j a va 2s. c o m*/ // At least one server failed } }); }