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 anIntegrationFlow
dependant bean in the application context.Add an object which will be registered as anIntegrationFlow
dependant bean in the application context.autoStartup
(boolean autoStartupToSet) Theboolean
flag to indication if anIntegrationFlow
must be started automatically after registration.Specify anid
for theIntegrationFlow
to register.register()
Register anIntegrationFlow
and all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistration
control object.Set the configuration sourceObject
for 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 anid
for theIntegrationFlow
to register. Must be unique per context. The registration with thisid
must be destroyed before reusing for a newIntegrationFlow
instance.- Specified by:
id
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Parameters:
id
- the id for theIntegrationFlow
to register- Returns:
- the current builder instance
-
autoStartup
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder autoStartup(boolean autoStartupToSet) Theboolean
flag to indication if anIntegrationFlow
must be started automatically after registration. Defaults totrue
.- Specified by:
autoStartup
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Parameters:
autoStartupToSet
- start or not theIntegrationFlow
automatically after registration.- Returns:
- the current builder instance
-
addBean
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder addBean(Object bean) Add an object which will be registered as anIntegrationFlow
dependant 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:
addBean
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Parameters:
bean
- an additional arbitrary bean to register into the application context.- Returns:
- the current builder instance
-
addBean
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder addBean(@Nullable String name, Object bean) Add an object which will be registered as anIntegrationFlow
dependant 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:
addBean
in 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.IntegrationFlowRegistrationBuilder
Set the configuration sourceObject
for 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:
setSource
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Parameters:
source
- the configuration source representation.- Returns:
- the current builder instance
-
useFlowIdAsPrefix
Description copied from interface:IntegrationFlowContext.IntegrationFlowRegistrationBuilder
Invoke 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:
useFlowIdAsPrefix
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Returns:
- the current builder instance.
- See Also:
-
register
Register anIntegrationFlow
and all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistration
control object.- Specified by:
register
in interfaceIntegrationFlowContext.IntegrationFlowRegistrationBuilder
- Returns:
- the
IntegrationFlowContext.IntegrationFlowRegistration
instance.
-