Provides a simple and useful helpers to Vert.x
Add the dependency to your project and use the provided methods to register and consume the service.
<dependency>
<groupId>com.rapatao.vertx</groupId>
<artifactId>vertx-java-helper</artifactId>
<version>${vertx-java-helper.version}</version>
</dependency>
The following repository allows you to access the dependency in OSSRH directly, just add the configuration in your "pom.xml" to get the wanted version.
<repositories>
<repository>
<id>sonatype-public-repository</id>
<name>oss.sonatype.org public repository</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
The following example shows how to handle a Future:
final Future<Object> future = ...
future.setHandler(AsyncHandler.builder()
.onSuccess(success -> {
// handle success event
})
.onFail(fail -> {
// handle fail event
})
.onComplete(() -> {
// handle complete event
}).build());