Do not confuse futures with promises.
They allow you to defer the action of providing a result. In most cases, you don’t need to create promises yourself in a Vert.x application.
Vert.x futures are not JDK futures, they can be
They shall be used for simple coordination of asynchronous tasks, and especially those of:
with the start method of a verticle, prepare the database, then start the webserver
@Override
public void start(Promise<Void> promise) throws Exception {
Future<Void> steps =
prepareDatabase()
.compose(v -> startHttpServer());
steps.setHandler(promise);
}
Promise<Void> promise = Promise.promise();