JerseyHandler handler = new DefaultJerseyHandler(provider, new ArrayList<>());
JerseyServer server = new DefaultJerseyServer(handler);
JerseyOptions options = new DefaultJerseyOptions(null);
When when = WhenFactory.createSync();
DefaultWhenJerseyServer whenJerseyServer = new DefaultWhenJerseyServer(vertx, server, options, when);
JsonObject config = new JsonObject()
.put("host", host)
.put("port", port)
.put("resources", new JsonArray().add("com.englishtown.vertx.jersey.promises.integration.resources"));
CountDownLatch latch = new CountDownLatch(1);
whenJerseyServer.createServer(config)
.then(value -> {
latch.countDown();
return null;
})
.otherwise(t -> {