ManagedProcessorMBean processor = MBeanServerInvocationHandler.newProxyInstance(server, on, ManagedProcessorMBean.class, true);
// the processor must belong to this route
if (getRouteId().equals(processor.getRouteId())) {
sb.append(" <processorStat").append(String.format(" id=\"%s\"", processor.getProcessorId()));
// use substring as we only want the attributes
sb.append(" ").append(processor.dumpStatsAsXml(fullStats).substring(7)).append("\n");
}
}
}
sb.append(" </processorStats>\n");
}