Class StandardIntegrationFlowContext
java.lang.Object
org.springframework.integration.dsl.context.StandardIntegrationFlowContext
- All Implemented Interfaces:
Aware,BeanFactoryAware,IntegrationFlowContext
public final class StandardIntegrationFlowContext
extends Object
implements IntegrationFlowContext, BeanFactoryAware
Standard implementation of
IntegrationFlowContext.- Since:
- 5.1
- Author:
- Artem Bilan, Gary Russell, Alexander Shaklein, Artem Vozhdayenko
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classA 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 TypeMethodDescriptiongetRegistrationById(String flowId) Obtain anIntegrationFlowContext.IntegrationFlowRegistrationfor theIntegrationFlowassociated with the providedflowId.Provide the state of the mapping of integration flow names to theirIntegrationFlowContext.IntegrationFlowRegistrationinstances.booleanisUseIdAsPrefix(String flowId) Return true to prefix flow bean names with the flow id and a period.messagingTemplateFor(String flowId) Obtain aMessagingTemplatewith its default destination set to the input channel of theIntegrationFlowfor providedflowId.registration(IntegrationFlow integrationFlow) Associate providedIntegrationFlowwith anStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilderfor additional options and farther registration in the application context.voidDestroy anIntegrationFlowbean (as well as all its dependant beans) for providedflowIdand clean up all the local cache for it.voidsetBeanFactory(BeanFactory beanFactory)
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
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
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
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
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
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.
-