INT-4275: Add IntegrationFlowContext.getRegistry

JIRA: https://jira.spring.io/browse/INT-4275

To analyze the state of the `IntegrationFlowContext` provide the access to
its internal `registry`
This commit is contained in:
Artem Bilan
2017-05-15 20:14:54 -04:00
committed by Gary Russell
parent 4bf266be50
commit 4dba3065ff

View File

@@ -16,6 +16,7 @@
package org.springframework.integration.dsl.context;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -171,6 +172,15 @@ public final class IntegrationFlowContext implements BeanFactoryAware {
.getMessagingTemplate();
}
/**
* Provide the state of the mapping of integration flow names to their
* {@link IntegrationFlowRegistration} instances.
* @return the registry of flow ids and their registration.
*/
public Map<String, IntegrationFlowRegistration> getRegistry() {
return Collections.unmodifiableMap(this.registry);
}
private String generateBeanName(Object instance, String parentName) {
if (instance instanceof NamedComponent && ((NamedComponent) instance).getComponentName() != null) {
return ((NamedComponent) instance).getComponentName();