sb.append(" <routeStats>\n");
for (ObjectName on : routes) {
ManagedRouteMBean route = MBeanServerInvocationHandler.newProxyInstance(server, on, ManagedRouteMBean.class, true);
sb.append(" <routeStat").append(String.format(" id=\"%s\"", route.getRouteId()));
// use substring as we only want the attributes
stat = route.dumpStatsAsXml(fullStats);
sb.append(" ").append(stat.substring(7, stat.length() - 2)).append(">\n");
// add processor details if needed
if (includeProcessors) {
sb.append(" <processorStats>\n");