Skip to content

Instantly share code, notes, and snippets.

Jeremy Truelove jtruelove

Block or report user

Report or block jtruelove

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

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:

View gist:c4bac7bcbc8e960bc721
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();
View gist:7a1a4021b1acf0960aa4
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;
View gist:a12173eb5dd9fc10960c
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();
});
}
View instances.diff
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
You can’t perform that action at this time.