List of usage examples for org.springframework.integration.monitor ManagedEndpoint ManagedEndpoint
public ManagedEndpoint(AbstractEndpoint delegate)
From source file:org.springframework.integration.monitor.IntegrationMBeanExporter.java
private void registerEndpoints() { String[] names = beanFactory.getBeanNamesForType(AbstractEndpoint.class); Set<String> endpointNames = new HashSet<String>(); for (String name : names) { if (!beansByEndpointName.values().contains(name)) { AbstractEndpoint endpoint = beanFactory.getBean(name, AbstractEndpoint.class); String beanKey;//from w w w.ja va2 s . co m name = endpoint.getComponentName(); String source; if (name.startsWith("_org.springframework.integration")) { name = getInternalComponentName(name); source = "internal"; } else { name = endpoint.getComponentName(); source = "endpoint"; } if (!PatternMatchUtils.simpleMatch(this.componentNamePatterns, name)) { continue; } if (endpointNames.contains(name)) { int count = 0; String unique = name + "#" + count; while (endpointNames.contains(unique)) { unique = name + "#" + (++count); } name = unique; } endpointNames.add(name); beanKey = getEndpointBeanKey(endpoint, name, source); ObjectName objectName = registerBeanInstance(new ManagedEndpoint(endpoint), beanKey); logger.info("Registered endpoint without MessageSource: " + objectName); } } }