Class StandardIntegrationFlowContext
java.lang.Object
org.springframework.integration.dsl.context.StandardIntegrationFlowContext
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,IntegrationFlowContext
public final class StandardIntegrationFlowContext extends java.lang.Object implements IntegrationFlowContext, org.springframework.beans.factory.BeanFactoryAware
Standard implementation of
IntegrationFlowContext.- Since:
- 5.1
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilderA Builder pattern implementation for the options to registerIntegrationFlowin the application context.Nested classes/interfaces inherited from interface org.springframework.integration.dsl.context.IntegrationFlowContext
IntegrationFlowContext.IntegrationFlowRegistration, IntegrationFlowContext.IntegrationFlowRegistrationBuilder -
Method Summary
Modifier and Type Method Description IntegrationFlowContext.IntegrationFlowRegistrationgetRegistrationById(java.lang.String flowId)Obtain anIntegrationFlowContext.IntegrationFlowRegistrationfor theIntegrationFlowassociated with the providedflowId.java.util.Map<java.lang.String,IntegrationFlowContext.IntegrationFlowRegistration>getRegistry()Provide the state of the mapping of integration flow names to theirIntegrationFlowContext.IntegrationFlowRegistrationinstances.booleanisUseIdAsPrefix(java.lang.String flowId)Return true to prefix flow bean names with the flow id and a period.MessagingTemplatemessagingTemplateFor(java.lang.String flowId)Obtain aMessagingTemplatewith its default destination set to the input channel of theIntegrationFlowfor providedflowId.StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilderregistration(IntegrationFlow integrationFlow)Associate providedIntegrationFlowwith anStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilderfor additional options and farther registration in the application context.voidremove(java.lang.String flowId)Destroy anIntegrationFlowbean (as well as all its dependant beans) for providedflowIdand clean up all the local cache for it.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
registration
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow)Associate providedIntegrationFlowwith anStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilderfor additional options and farther registration in the application context.- Specified by:
registrationin interfaceIntegrationFlowContext- Parameters:
integrationFlow- theIntegrationFlowto register- Returns:
- the IntegrationFlowRegistrationBuilder associated with the provided
IntegrationFlow
-
isUseIdAsPrefix
public boolean isUseIdAsPrefix(java.lang.String flowId)Description copied from interface:IntegrationFlowContextReturn true to prefix flow bean names with the flow id and a period.- Specified by:
isUseIdAsPrefixin interfaceIntegrationFlowContext- Parameters:
flowId- the flow id.- Returns:
- true to use as a prefix.
-
getRegistrationById
public IntegrationFlowContext.IntegrationFlowRegistration getRegistrationById(java.lang.String flowId)Obtain anIntegrationFlowContext.IntegrationFlowRegistrationfor theIntegrationFlowassociated with the providedflowId.- Specified by:
getRegistrationByIdin interfaceIntegrationFlowContext- Parameters:
flowId- the bean name to obtain- Returns:
- the IntegrationFlowRegistration for provided
idornull
-
remove
public void remove(java.lang.String flowId)Destroy anIntegrationFlowbean (as well as all its dependant beans) for providedflowIdand clean up all the local cache for it.- Specified by:
removein interfaceIntegrationFlowContext- Parameters:
flowId- the bean name to destroy from
-
messagingTemplateFor
Obtain aMessagingTemplatewith its default destination set to the input channel of theIntegrationFlowfor providedflowId.Any
IntegrationFlowbean (not only manually registered) can be used for this method.If
IntegrationFlowdoesn't start with theMessageChannel, theIllegalStateExceptionis thrown.- Specified by:
messagingTemplateForin interfaceIntegrationFlowContext- Parameters:
flowId- the bean name to obtain the input channel from- Returns:
- the
MessagingTemplateinstance
-
getRegistry
public java.util.Map<java.lang.String,IntegrationFlowContext.IntegrationFlowRegistration> getRegistry()Provide the state of the mapping of integration flow names to theirIntegrationFlowContext.IntegrationFlowRegistrationinstances.- Specified by:
getRegistryin interfaceIntegrationFlowContext- Returns:
- the registry of flow ids and their registration.
-