From 4dba3065ff1b1f4edff1bdf28a534dc8d50c72d4 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 15 May 2017 20:14:54 -0400 Subject: [PATCH] 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` --- .../dsl/context/IntegrationFlowContext.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/context/IntegrationFlowContext.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/context/IntegrationFlowContext.java index 57bed77386..c77fdc0319 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/context/IntegrationFlowContext.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/context/IntegrationFlowContext.java @@ -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 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();