Class StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
java.lang.Object
org.springframework.integration.dsl.context.StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
- All Implemented Interfaces:
IntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Enclosing class:
- StandardIntegrationFlowContext
public final class StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
extends Object
implements IntegrationFlowContext.IntegrationFlowRegistrationBuilder
A Builder pattern implementation for the options to register
IntegrationFlow
in the application context.-
Method Summary
Modifier and TypeMethodDescriptionAdd an object which will be registered as anIntegrationFlowdependant bean in the application context.Add an object which will be registered as anIntegrationFlowdependant bean in the application context.autoStartup(boolean autoStartupToSet) Thebooleanflag to indication if anIntegrationFlowmust be started automatically after registration.Specify anidfor theIntegrationFlowto register.register()Register anIntegrationFlowand all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistrationcontrol object.Set the configuration sourceObjectfor this manual Integration flow definition.Invoke this method to prefix bean names in the flow with the (required) flow id and a period.
-
Method Details
-
id
Specify anidfor theIntegrationFlowto register. Must be unique per context. The registration with thisidmust be destroyed before reusing for a newIntegrationFlowinstance.- Specified by:
idin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Parameters:
id- the id for theIntegrationFlowto register- Returns:
- the current builder instance
-
autoStartup
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder autoStartup(boolean autoStartupToSet) Thebooleanflag to indication if anIntegrationFlowmust be started automatically after registration. Defaults totrue.- Specified by:
autoStartupin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Parameters:
autoStartupToSet- start or not theIntegrationFlowautomatically after registration.- Returns:
- the current builder instance
-
addBean
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder addBean(Object bean) Add an object which will be registered as anIntegrationFlowdependant bean in the application context. Usually it is some support component, which needs an application context. For example dynamically created connection factories or header mappers for AMQP, JMS, TCP etc.- Specified by:
addBeanin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Parameters:
bean- an additional arbitrary bean to register into the application context.- Returns:
- the current builder instance
-
addBean
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder addBean(String name, Object bean) Add an object which will be registered as anIntegrationFlowdependant bean in the application context. Usually it is some support component, which needs an application context. For example dynamically created connection factories or header mappers for AMQP, JMS, TCP etc.- Specified by:
addBeanin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Parameters:
name- the name for the bean to register.bean- an additional arbitrary bean to register into the application context.- Returns:
- the current builder instance
-
setSource
Description copied from interface:IntegrationFlowContext.IntegrationFlowRegistrationBuilderSet the configuration sourceObjectfor this manual Integration flow definition. Can be any arbitrary object which could easily lead to a source code for the flow when a messaging exception happens at runtime.- Specified by:
setSourcein interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Parameters:
source- the configuration source representation.- Returns:
- the current builder instance
-
useFlowIdAsPrefix
Description copied from interface:IntegrationFlowContext.IntegrationFlowRegistrationBuilderInvoke this method to prefix bean names in the flow with the (required) flow id and a period. This is useful if you wish to register the same flow multiple times while retaining the ability to reference beans within the flow; adding the unique flow id to the bean name makes the name unique.- Specified by:
useFlowIdAsPrefixin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Returns:
- the current builder instance.
- See Also:
-
register
Register anIntegrationFlowand all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistrationcontrol object.- Specified by:
registerin interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder- Returns:
- the
IntegrationFlowContext.IntegrationFlowRegistrationinstance.
-