Set<ManagedProcessorMBean> processors = new LinkedHashSet<ManagedProcessorMBean>();
if (includeProcessors) {
// gather all the processors for this CamelContext, which requires JMX
query = ObjectName.getInstance("org.apache.camel:context=" + prefix + getContext().getManagementName() + ",type=processors,*");
Set<ObjectName> names = server.queryNames(query, null);
for (ObjectName on : names) {
ManagedProcessorMBean processor = MBeanServerInvocationHandler.newProxyInstance(server, on, ManagedProcessorMBean.class, true);
processors.add(processor);
}
}