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 anIntegrationFlowdependant bean in the application context.Add an object which will be registered as anIntegrationFlowdependant bean in the application context.autoStartup(boolean autoStartup) 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.setDescription(String description) Set a human-readable description of this integration flow.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.- Parameters:
id- the id for theIntegrationFlowto register- Returns:
- the current builder instance
-
autoStartup
Thebooleanflag to indication if anIntegrationFlowmust be started automatically after registration. Defaults totrue.- Parameters:
autoStartup- start or not theIntegrationFlowautomatically after registration.- Returns:
- the current builder instance
-
addBean
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.- 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 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.- 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 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.- 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 anIntegrationFlowand all the dependant and support components in the application context and return an associatedIntegrationFlowContext.IntegrationFlowRegistrationcontrol object.- Returns:
- the
IntegrationFlowContext.IntegrationFlowRegistrationinstance.
-