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
Modifier and TypeClassDescriptionfinal class
A Builder pattern implementation for the options to registerIntegrationFlow
in 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.IntegrationFlowRegistration
for theIntegrationFlow
associated with the providedflowId
.Provide the state of the mapping of integration flow names to theirIntegrationFlowContext.IntegrationFlowRegistration
instances.boolean
isUseIdAsPrefix
(String flowId) Return true to prefix flow bean names with the flow id and a period.messagingTemplateFor
(String flowId) Obtain aMessagingTemplate
with its default destination set to the input channel of theIntegrationFlow
for providedflowId
.registration
(IntegrationFlow integrationFlow) Associate providedIntegrationFlow
with anStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
for additional options and farther registration in the application context.void
Destroy anIntegrationFlow
bean (as well as all its dependant beans) for providedflowId
and clean up all the local cache for it.void
setBeanFactory
(BeanFactory beanFactory)
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
registration
public StandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow) Associate providedIntegrationFlow
with anStandardIntegrationFlowContext.StandardIntegrationFlowRegistrationBuilder
for additional options and farther registration in the application context.- Specified by:
registration
in interfaceIntegrationFlowContext
- Parameters:
integrationFlow
- theIntegrationFlow
to register- Returns:
- the IntegrationFlowRegistrationBuilder associated with the provided
IntegrationFlow
-
isUseIdAsPrefix
Description copied from interface:IntegrationFlowContext
Return true to prefix flow bean names with the flow id and a period.- Specified by:
isUseIdAsPrefix
in interfaceIntegrationFlowContext
- Parameters:
flowId
- the flow id.- Returns:
- true to use as a prefix.
-
getRegistrationById
Obtain anIntegrationFlowContext.IntegrationFlowRegistration
for theIntegrationFlow
associated with the providedflowId
.- Specified by:
getRegistrationById
in interfaceIntegrationFlowContext
- Parameters:
flowId
- the bean name to obtain- Returns:
- the IntegrationFlowRegistration for provided
id
ornull
-
remove
Destroy anIntegrationFlow
bean (as well as all its dependant beans) for providedflowId
and clean up all the local cache for it.- Specified by:
remove
in interfaceIntegrationFlowContext
- Parameters:
flowId
- the bean name to destroy from
-
messagingTemplateFor
Obtain aMessagingTemplate
with its default destination set to the input channel of theIntegrationFlow
for providedflowId
.Any
IntegrationFlow
bean (not only manually registered) can be used for this method.If
IntegrationFlow
doesn't start with theMessageChannel
, theIllegalStateException
is thrown.- Specified by:
messagingTemplateFor
in interfaceIntegrationFlowContext
- Parameters:
flowId
- the bean name to obtain the input channel from- Returns:
- the
MessagingTemplate
instance
-
getRegistry
Provide the state of the mapping of integration flow names to theirIntegrationFlowContext.IntegrationFlowRegistration
instances.- Specified by:
getRegistry
in interfaceIntegrationFlowContext
- Returns:
- the registry of flow ids and their registration.
-