Interface IntegrationFlowContext.IntegrationFlowRegistrationBuilder
- All Known Implementing Classes:
StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
- Enclosing interface:
- IntegrationFlowContext
public static interface 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 autoStartup) 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.setDescription
(String description) Set a human-readable description of this integration flow.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.- Parameters:
id
- the id for theIntegrationFlow
to register- Returns:
- the current builder instance
-
autoStartup
Theboolean
flag to indication if anIntegrationFlow
must be started automatically after registration. Defaults totrue
.- Parameters:
autoStartup
- start or not theIntegrationFlow
automatically after registration.- Returns:
- the current builder instance
-
addBean
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.- Parameters:
bean
- an additional arbitrary bean to register into the application context.- Returns:
- the current builder instance
-
addBean
IntegrationFlowContext.IntegrationFlowRegistrationBuilder 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.- 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
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.- Parameters:
source
- the configuration source representation.- Returns:
- the current builder instance
- Since:
- 5.2
-
setDescription
Set a human-readable description of this integration flow.- Parameters:
description
- the description for integration flow instance.- Returns:
- the current builder instance
- Since:
- 6.4
-
useFlowIdAsPrefix
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.- Returns:
- the current builder instance.
- Since:
- 5.0.6
- See Also:
-
register
Register anIntegrationFlow
and all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistration
control object.- Returns:
- the
IntegrationFlowContext.IntegrationFlowRegistration
instance.
-