@Override public void handle(RouteContext routeContext) { Response response = routeContext.getResponse().noCache().text(); SortedMap<String, HealthCheck.Result> healthChecks = healthCheckRegistry.runHealthChecks(); if (healthChecks.isEmpty()) { response.notImplemented().send("The health checks are empty"); } else { boolean notHealthy = healthChecks.values().stream().anyMatch(hc -> !hc.isHealthy()); if (notHealthy) { response.internalError().send("The health is bad"); } else { response.ok().send("The health is good"); } } }
@Override public void handle(RouteContext routeContext) { Response response = routeContext.getResponse().noCache().text(); if (threadDump != null) { threadDump.dump(response.getOutputStream()); } else { response.internalError().send("Sorry your runtime environment does not allow to dump threads"); } }
@Override public void handle(RouteContext routeContext) { Response response = routeContext.getResponse().noCache().text(); SortedMap<String, HealthCheck.Result> healthChecks = healthCheckRegistry.runHealthChecks(); if (healthChecks.isEmpty()) { response.notImplemented().send("The health checks are empty"); } else { boolean notHealthy = healthChecks.values().stream().anyMatch(hc -> !hc.isHealthy()); if (notHealthy) { response.internalError().send("The health is bad"); } else { response.ok().send("The health is good"); } } }
@Override public void handle(RouteContext routeContext) { Response response = routeContext.getResponse().noCache().text(); if (threadDump != null) { threadDump.dump(response.getOutputStream()); } else { response.internalError().send("Sorry your runtime environment does not allow to dump threads"); } }
context.getResponse().internalError().commit();
context.getResponse().internalError().commit();