StringBuilder builder = new StringBuilder("\nCoverage summary\n"); int routes = managedCamelContext.getTotalRoutes(); long contextExchangesTotal = managedCamelContext.getExchangesTotal(); builder.append("\t\tCamelContext (").append(managedCamelContext.getCamelId()).append(") total: ").append(contextExchangesTotal).append("\n");
logCoverageSummary(managedCamelContext); String xml = managedCamelContext.dumpRoutesCoverageAsXml(); String combined = "<camelRouteCoverage>\n" + gatherTestDetailsAsXml() + xml + "\n</camelRouteCoverage>";
public String getCamelVersion() throws Exception { return proxy.getCamelVersion(); }
@Override public List<Map<String, String>> getCamelContexts() throws Exception { List<Map<String, String>> answer = new ArrayList<>(); List<CamelContext> camelContexts = getLocalCamelContexts(); for (CamelContext camelContext : camelContexts) { Map<String, String> row = new LinkedHashMap<>(); row.put("name", camelContext.getName()); row.put("state", camelContext.getStatus().name()); row.put("uptime", camelContext.getUptime()); if (camelContext.getManagedCamelContext() != null) { row.put("exchangesTotal", "" + camelContext.getManagedCamelContext().getExchangesTotal()); row.put("exchangesInflight", "" + camelContext.getManagedCamelContext().getExchangesInflight()); row.put("exchangesFailed", "" + camelContext.getManagedCamelContext().getExchangesFailed()); } else { row.put("exchangesTotal", "0"); row.put("exchangesInflight", "0"); row.put("exchangesFailed", "0"); } answer.add(row); } return answer; }
@ManagedAttribute public Long getResetTimestamp() { final Date resetTimestamp = camelContext.getManagedCamelContext().getResetTimestamp(); return resetTimestamp == null ? null : resetTimestamp.getTime(); }
@ManagedAttribute public Long getLastExchangeCompletedTimestamp() { final Date timestamp = camelContext.getManagedCamelContext() .getLastExchangeCompletedTimestamp(); return timestamp == null ? null : timestamp.getTime(); }
@ManagedAttribute public Long getLastExchangeFailureTimestamp() { final Date timestamp = camelContext.getManagedCamelContext() .getLastExchangeFailureTimestamp(); return timestamp == null ? null : timestamp.getTime(); }
@ManagedAttribute public Long getStartTimestamp() { return camelContext.getManagedCamelContext().getStartTimestamp().getTime(); }