I hereby claim:
- I am jtruelove on github.
- I am jtruelove (https://keybase.io/jtruelove) on keybase.
- I have a public key ASA1jvAdoP4PMNEf5_-s01NHyaJ1IiF0TU_zrhlOvUUPRwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| private static Vertx vertx; | |
| static { | |
| // adds the Bouncy castle provider to java security | |
| Security.addProvider(new BouncyCastleProvider()); | |
| } | |
| public static void main(String [] args) throws Exception { | |
| vertx = Vertx.vertx(); |
| import io.netty.handler.codec.http.HttpResponseStatus; | |
| import io.vertx.core.AbstractVerticle; | |
| import io.vertx.core.Future; | |
| import io.vertx.core.http.HttpServerOptions; | |
| import io.vertx.ext.apex.Route; | |
| import io.vertx.ext.apex.Router; | |
| import io.vertx.ext.apex.handler.LoggerHandler; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
| public void addFailureHandling(Router router) { | |
| Route route = router.route(); | |
| route.handler(LoggerHandler.create()); | |
| // this does not get hit on a not found resource, i see the logger hit but my handler never gets hit | |
| route.failureHandler(routingContext -> { | |
| logger.warn("no path found for {}", routingContext.request().uri()); | |
| routingContext.request().response().setStatusCode(HttpResponseStatus.NOT_FOUND.code()).end(); | |
| }); | |
| } |
| diff --git a/src/main/java/io/vertx/core/Vertx.java b/src/main/java/io/vertx/core/Vertx.java | |
| index af83f3a..521968b 100644 | |
| --- a/src/main/java/io/vertx/core/Vertx.java | |
| +++ b/src/main/java/io/vertx/core/Vertx.java | |
| @@ -441,6 +441,13 @@ public interface Vertx extends Measured { | |
| */ | |
| boolean isClustered(); | |
| + /** | |
| + * The number of verticle instances associated to a deployment id |