Java 类org.apache.camel.api.management.mbean.ManagedProcessorMBean 实例源码

项目:Camel    文件:DefaultCamelContext.java   
public <T extends ManagedProcessorMBean> T getManagedProcessor(String id, Class<T> type) {
    // jmx must be enabled
    if (getManagementStrategy().getManagementAgent() == null) {
        return null;
    }

    Processor processor = getProcessor(id);
    ProcessorDefinition def = getProcessorDefinition(id);

    if (processor != null && def != null) {
        try {
            ObjectName on = getManagementStrategy().getManagementNamingStrategy().getObjectNameForProcessor(this, processor, def);
            return getManagementStrategy().getManagementAgent().newProxyClient(on, type);
        } catch (MalformedObjectNameException e) {
            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
    }

    return null;
}
项目:Camel    文件:ManagedRoute.java   
@Override
public int compare(ManagedProcessorMBean o1, ManagedProcessorMBean o2) {
    return o1.getIndex().compareTo(o2.getIndex());
}
项目:Camel    文件:ManagedCamelContext.java   
@Override
public int compare(ManagedProcessorMBean o1, ManagedProcessorMBean o2) {
    return o1.getIndex().compareTo(o2.getIndex());
}
项目:microservice-bundle    文件:ManagedCamelContext.java   
@Override
public <T extends ManagedProcessorMBean> T getManagedProcessor(String id, Class<T> type) {
  return context.getManagedProcessor(id, type);
}
项目:dropwizard-camel    文件:ManagedCamelContext.java   
@Override
public <T extends ManagedProcessorMBean> T getManagedProcessor(String id, Class<T> type) {
    return context.getManagedProcessor(id, type);
}
项目:Camel    文件:CamelContext.java   
/**
 * Gets the managed processor client api from any of the routes which with the given id
 *
 * @param id id of the processor
 * @param type the managed processor type from the {@link org.apache.camel.api.management.mbean} package.
 * @return the processor or <tt>null</tt> if not found
 * @throws IllegalArgumentException if the type is not compliant
 */
<T extends ManagedProcessorMBean> T getManagedProcessor(String id, Class<T> type);