public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinition<B>>
extends java.lang.Object
Builder pattern implementation for the EIP-method chain.
Provides a variety of methods to populate Spring Integration components
to an IntegrationFlow for the future registration in the
application context.IntegrationFlowBeanPostProcessor| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
currentComponent |
protected org.springframework.messaging.MessageChannel |
currentMessageChannel |
protected java.util.Set<java.lang.Object> |
integrationComponents |
| Modifier and Type | Method and Description |
|---|---|
protected B |
_this() |
B |
aggregate()
Populate the
AggregatingMessageHandler with default options. |
B |
aggregate(Consumer<AggregatorSpec> aggregatorConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
Populate the
AggregatingMessageHandler with provided options from AggregatorSpec. |
B |
aggregate(Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
Populate the
AggregatingMessageHandler with default options. |
B |
bridge(Consumer<GenericEndpointSpec<org.springframework.integration.handler.BridgeHandler>> endpointConfigurer)
Populate a
BridgeHandler to the current integration flow position. |
B |
channel(Function<Channels,MessageChannelSpec<?,?>> channels)
Populate a
MessageChannel instance
at the current IntegrationFlow chain position using the Channels
factory fluent API. |
B |
channel(org.springframework.messaging.MessageChannel messageChannel)
Populate the provided
MessageChannel instance
at the current IntegrationFlow chain position. |
B |
channel(MessageChannelSpec<?,?> messageChannelSpec)
Populate a
MessageChannel instance
at the current IntegrationFlow chain position using the MessageChannelSpec
fluent API. |
B |
channel(java.lang.String messageChannelName)
Populate a
MessageChannelReference instance
at the current IntegrationFlow chain position. |
B |
claimCheckIn(org.springframework.integration.store.MessageStore messageStore)
Populate the
MessageTransformingHandler for the ClaimCheckInTransformer
with provided MessageStore. |
B |
claimCheckIn(org.springframework.integration.store.MessageStore messageStore,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler for the ClaimCheckInTransformer
with provided MessageStore. |
B |
claimCheckOut(org.springframework.integration.store.MessageStore messageStore)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore. |
B |
claimCheckOut(org.springframework.integration.store.MessageStore messageStore,
boolean removeMessage)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag. |
B |
claimCheckOut(org.springframework.integration.store.MessageStore messageStore,
boolean removeMessage,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag. |
B |
controlBus()
Populate the
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position. |
B |
controlBus(Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Populate the
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position. |
B |
delay(java.lang.String groupId)
Populate a
DelayHandler to the current integration flow position
with default options. |
B |
delay(java.lang.String groupId,
Consumer<DelayerEndpointSpec> endpointConfigurer)
Populate a
DelayHandler to the current integration flow position
with provided options. |
<P> B |
delay(java.lang.String groupId,
Function<org.springframework.messaging.Message<P>,java.lang.Object> function)
Populate a
DelayHandler to the current integration flow position
with provided delayFunction. |
<P> B |
delay(java.lang.String groupId,
Function<org.springframework.messaging.Message<P>,java.lang.Object> function,
Consumer<DelayerEndpointSpec> endpointConfigurer)
Populate a
DelayHandler to the current integration flow position
with provided delayFunction. |
B |
delay(java.lang.String groupId,
java.lang.String expression)
Populate a
DelayHandler to the current integration flow position
with provided delayExpression. |
B |
delay(java.lang.String groupId,
java.lang.String expression,
Consumer<DelayerEndpointSpec> endpointConfigurer)
Populate a
DelayHandler to the current integration flow position
with provided delayExpression. |
B |
enrich(Consumer<EnricherSpec> enricherConfigurer)
Populate a
ContentEnricher to the current integration flow position
with provided options. |
B |
enrich(Consumer<EnricherSpec> enricherConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.ContentEnricher>> endpointConfigurer)
Populate a
ContentEnricher to the current integration flow position
with provided options. |
B |
enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer)
|
B |
enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
|
B |
enrichHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
Accept a
Map of values to be used for the
Message header enrichment. |
B |
enrichHeaders(java.util.Map<java.lang.String,java.lang.Object> headers,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Accept a
Map of values to be used for the
Message header enrichment. |
B |
enrichHeaders(MapBuilder<?,java.lang.String,java.lang.Object> headers)
Populate a
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder. |
B |
enrichHeaders(MapBuilder<?,java.lang.String,java.lang.Object> headers,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate a
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder. |
<P> B |
filter(java.lang.Class<P> payloadType,
org.springframework.integration.core.GenericSelector<P> genericSelector)
Populate a
MessageFilter with MethodInvokingSelector
for the provided GenericSelector. |
<P> B |
filter(java.lang.Class<P> payloadType,
org.springframework.integration.core.GenericSelector<P> genericSelector,
Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector
for the provided GenericSelector. |
<P> B |
filter(org.springframework.integration.core.GenericSelector<P> genericSelector)
Populate a
MessageFilter with MethodInvokingSelector
for the provided GenericSelector. |
<P> B |
filter(org.springframework.integration.core.GenericSelector<P> genericSelector,
Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector
for the provided GenericSelector. |
B |
filter(java.lang.String expression)
Populate a
MessageFilter with MessageSelector for the provided SpEL expression. |
B |
fixedSubscriberChannel()
Populate an
FixedSubscriberChannel instance
at the current IntegrationFlow chain position. |
B |
fixedSubscriberChannel(java.lang.String messageChannelName)
Populate an
FixedSubscriberChannel instance
at the current IntegrationFlow chain position. |
B |
gateway(IntegrationFlow flow)
Populate the "artificial"
GatewayMessageHandler for the provided
subflow. |
B |
gateway(IntegrationFlow flow,
Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the provided
subflow with options from GatewayEndpointSpec. |
B |
gateway(org.springframework.messaging.MessageChannel requestChannel)
Populate the "artificial"
GatewayMessageHandler for the provided
requestChannel to send a request with default options. |
B |
gateway(org.springframework.messaging.MessageChannel requestChannel,
Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the provided
requestChannel to send a request with options from GatewayEndpointSpec. |
B |
gateway(java.lang.String requestChannel)
Populate the "artificial"
GatewayMessageHandler for the provided
requestChannel to send a request with default options. |
B |
gateway(java.lang.String requestChannel,
Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the provided
requestChannel to send a request with options from GatewayEndpointSpec. |
protected StandardIntegrationFlow |
get() |
<P> B |
handle(java.lang.Class<P> payloadType,
GenericHandler<P> handler)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<P> B |
handle(java.lang.Class<P> payloadType,
GenericHandler<P> handler,
Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<P> B |
handle(GenericHandler<P> handler)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<P> B |
handle(GenericHandler<P> handler,
Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<H extends org.springframework.messaging.MessageHandler> |
handle(H messageHandler,
Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the provided
MessageHandler implementation. |
B |
handle(org.springframework.messaging.MessageHandler messageHandler)
Populate a
ServiceActivatingHandler for the provided
MessageHandler implementation. |
B |
handle(MessageHandlerSpec<?,? extends org.springframework.messaging.MessageHandler> messageHandlerSpec)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory:
|
<H extends org.springframework.messaging.MessageHandler> |
handle(MessageHandlerSpec<?,H> messageHandlerSpec,
Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory:
In addition accept options for the integration endpoint using GenericEndpointSpec. |
B |
handle(java.lang.String beanName,
java.lang.String methodName)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
handle(java.lang.String beanName,
java.lang.String methodName,
Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
<H extends org.springframework.messaging.MessageHandler> |
handleWithAdapter(Function<Adapters,MessageHandlerSpec<?,H>> adapters)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Adapters factory. |
<H extends org.springframework.messaging.MessageHandler> |
handleWithAdapter(Function<Adapters,MessageHandlerSpec<?,H>> adapters,
Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Adapters factory. |
B |
headerFilter(org.springframework.integration.transformer.HeaderFilter headerFilter,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the provided
MessageTransformingHandler for the provided
HeaderFilter. |
B |
headerFilter(java.lang.String... headersToRemove)
Provide the
HeaderFilter to the current StandardIntegrationFlow. |
B |
headerFilter(java.lang.String headersToRemove,
boolean patternMatch)
Provide the
HeaderFilter to the current StandardIntegrationFlow. |
B |
publishSubscribeChannel(Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
The
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. |
B |
publishSubscribeChannel(java.util.concurrent.Executor executor,
Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
The
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. |
B |
resequence()
Populate the
ResequencingMessageHandler with default options. |
B |
resequence(Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
Populate the
ResequencingMessageHandler with default options. |
B |
resequence(Consumer<ResequencerSpec> resequencerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
Populate the
ResequencingMessageHandler with provided options from ResequencerSpec. |
B |
route(org.springframework.integration.router.AbstractMessageRouter router)
Populate the provided
AbstractMessageRouter implementation to the
current integration flow position. |
<P,T> B |
route(java.lang.Class<P> payloadType,
Function<P,T> router)
Populate the
MethodInvokingRouter for provided Function
and payload type with default options. |
<P,T> B |
route(java.lang.Class<P> payloadType,
Function<P,T> router,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for provided Function
and payload type and options from RouterSpec. |
<P,T> B |
route(java.lang.Class<P> payloadType,
Function<P,T> router,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
Populate the
MethodInvokingRouter for provided Function
and payload type and options from RouterSpec. |
<S,T> B |
route(Function<S,T> router)
Populate the
MethodInvokingRouter for provided Function
with default options. |
<S,T> B |
route(Function<S,T> router,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
|
<S,T> B |
route(Function<S,T> router,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
|
<R extends org.springframework.integration.router.AbstractMessageRouter> |
route(R router,
Consumer<GenericEndpointSpec<R>> endpointConfigurer)
Populate the provided
AbstractMessageRouter implementation to the
current integration flow position. |
<R extends org.springframework.integration.router.AbstractMappingMessageRouter> |
route(R router,
Consumer<RouterSpec<R>> routerConfigurer,
Consumer<GenericEndpointSpec<R>> endpointConfigurer)
Populate the provided
AbstractMappingMessageRouter implementation
with options from RouterSpec and endpoint options from GenericEndpointSpec. |
B |
route(java.lang.String expression)
Populate the
ExpressionEvaluatingRouter for provided SpEL expression
with default options. |
B |
route(java.lang.String expression,
Consumer<RouterSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> routerConfigurer)
Populate the
ExpressionEvaluatingRouter for provided SpEL expression
with provided options from RouterSpec. |
B |
route(java.lang.String expression,
Consumer<RouterSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> endpointConfigurer)
Populate the
ExpressionEvaluatingRouter for provided bean and its method
with provided options from RouterSpec. |
B |
route(java.lang.String beanName,
java.lang.String method)
Populate the
MethodInvokingRouter for provided bean and its method
with default options. |
B |
route(java.lang.String beanName,
java.lang.String method,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for provided bean and its method
with provided options from RouterSpec. |
B |
route(java.lang.String beanName,
java.lang.String method,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
Populate the
MethodInvokingRouter for provided bean and its method
with provided options from RouterSpec. |
B |
routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer)
Populate the
RecipientListRouter options from RecipientListRouterSpec. |
B |
routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.RecipientListRouter>> endpointConfigurer)
Populate the
RecipientListRouter options from RecipientListRouterSpec. |
B |
split()
Populate the
DefaultMessageSplitter with default options
to the current integration flow position. |
<P> B |
split(java.lang.Class<P> payloadType,
Function<P,?> splitter)
Populate the
MethodInvokingSplitter to evaluate the provided
Function at runtime. |
<P> B |
split(java.lang.Class<P> payloadType,
Function<P,?> splitter,
Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the provided
Function at runtime. |
B |
split(Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.DefaultMessageSplitter>> endpointConfigurer)
Populate the
DefaultMessageSplitter with provided options
to the current integration flow position. |
<P> B |
split(Function<P,?> splitter,
Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the provided
Function at runtime. |
<S extends org.springframework.integration.splitter.AbstractMessageSplitter> |
split(S splitter,
Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
B |
split(java.lang.String expression,
Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.ExpressionEvaluatingSplitter>> endpointConfigurer)
Populate the
ExpressionEvaluatingSplitter with provided
SpEL expression. |
B |
split(java.lang.String beanName,
java.lang.String methodName)
Populate the
MethodInvokingSplitter to evaluate the provided
method of the bean at runtime. |
B |
split(java.lang.String beanName,
java.lang.String methodName,
Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the provided
method of the bean at runtime. |
<P,T> B |
transform(java.lang.Class<P> payloadType,
org.springframework.integration.transformer.GenericTransformer<P,T> genericTransformer)
Populate the
MessageTransformingHandler instance for the provided GenericTransformer
for the specific payloadType to convert at runtime. |
<P,T> B |
transform(java.lang.Class<P> payloadType,
org.springframework.integration.transformer.GenericTransformer<P,T> genericTransformer,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance for the provided GenericTransformer
for the specific payloadType to convert at runtime. |
<S,T> B |
transform(org.springframework.integration.transformer.GenericTransformer<S,T> genericTransformer)
Populate the
MessageTransformingHandler instance for the provided GenericTransformer. |
<S,T> B |
transform(org.springframework.integration.transformer.GenericTransformer<S,T> genericTransformer,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance for the provided GenericTransformer. |
B |
transform(java.lang.String expression)
Populate the
Transformer EI Pattern specific MessageHandler implementation
for the SpEL Expression. |
protected final java.util.Set<java.lang.Object> integrationComponents
protected org.springframework.messaging.MessageChannel currentMessageChannel
protected java.lang.Object currentComponent
public B fixedSubscriberChannel()
FixedSubscriberChannel instance
at the current IntegrationFlow chain position.
The 'bean name' will be generated during the bean registration phase.IntegrationFlowDefinition.public B fixedSubscriberChannel(java.lang.String messageChannelName)
FixedSubscriberChannel instance
at the current IntegrationFlow chain position.
The provided messageChannelName is used for the bean registration.messageChannelName - the bean name to use.IntegrationFlowDefinition.public B channel(java.lang.String messageChannelName)
MessageChannelReference instance
at the current IntegrationFlow chain position.
The provided messageChannelName is used for the bean registration
(DirectChannel), if there is no such a bean
in the application context. Otherwise the existing MessageChannel bean is used
to wire integration endpoints.messageChannelName - the bean name to use.IntegrationFlowDefinition.public B channel(Function<Channels,MessageChannelSpec<?,?>> channels)
MessageChannel instance
at the current IntegrationFlow chain position using the Channels
factory fluent API.channels - the Function to use.IntegrationFlowDefinition.public B channel(MessageChannelSpec<?,?> messageChannelSpec)
MessageChannel instance
at the current IntegrationFlow chain position using the MessageChannelSpec
fluent API.messageChannelSpec - the MessageChannelSpec to use.IntegrationFlowDefinition.MessageChannelspublic B channel(org.springframework.messaging.MessageChannel messageChannel)
MessageChannel instance
at the current IntegrationFlow chain position.
The messageChannel can be an existing bean, or fresh instance, in which case
the IntegrationFlowBeanPostProcessor
will populate it as a bean with a generated name.messageChannel - the MessageChannel to populate.IntegrationFlowDefinition.public B publishSubscribeChannel(Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.publishSubscribeChannelConfigurer - the Consumer to specify
PublishSubscribeSpec options including 'subflow' definition.IntegrationFlowDefinition.public B publishSubscribeChannel(java.util.concurrent.Executor executor, Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.
Use the provided Executor for the target subscribers.executor - the Executor to use.publishSubscribeChannelConfigurer - the Consumer to specify
PublishSubscribeSpec options including 'subflow' definition.IntegrationFlowDefinition.public B controlBus()
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position.IntegrationFlowDefinition.ExpressionCommandMessageProcessorpublic B controlBus(Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position.endpointConfigurer - the Consumer to accept integration endpoint options.IntegrationFlowDefinition.ExpressionCommandMessageProcessor,
GenericEndpointSpecpublic B transform(java.lang.String expression)
Transformer EI Pattern specific MessageHandler implementation
for the SpEL Expression.expression - the Transformer Expression.IntegrationFlowDefinition.ExpressionEvaluatingTransformerpublic <S,T> B transform(org.springframework.integration.transformer.GenericTransformer<S,T> genericTransformer)
MessageTransformingHandler instance for the provided GenericTransformer.S - the source type - 'transform from'.T - the target type - 'transform to'.genericTransformer - the GenericTransformer to populate.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessorpublic <P,T> B transform(java.lang.Class<P> payloadType, org.springframework.integration.transformer.GenericTransformer<P,T> genericTransformer)
MessageTransformingHandler instance for the provided GenericTransformer
for the specific payloadType to convert at runtime.P - the payload type - 'transform from'.T - the target type - 'transform to'.payloadType - the Class for expected payload type.genericTransformer - the GenericTransformer to populate.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessorpublic <S,T> B transform(org.springframework.integration.transformer.GenericTransformer<S,T> genericTransformer, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler instance for the provided GenericTransformer.
In addition accept options for the integration endpoint using GenericEndpointSpec.S - the source type - 'transform from'.T - the target type - 'transform to'.genericTransformer - the GenericTransformer to populate.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessor,
GenericEndpointSpecpublic <P,T> B transform(java.lang.Class<P> payloadType, org.springframework.integration.transformer.GenericTransformer<P,T> genericTransformer, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler instance for the provided GenericTransformer
for the specific payloadType to convert at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.P - the payload type - 'transform from'.T - the target type - 'transform to'.payloadType - the Class for expected payload type.genericTransformer - the GenericTransformer to populate.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.MethodInvokingTransformer,
LambdaMessageProcessor,
GenericEndpointSpecpublic B filter(java.lang.String expression)
MessageFilter with MessageSelector for the provided SpEL expression.expression - the SpEL expression.IntegrationFlowDefinition.public <P> B filter(org.springframework.integration.core.GenericSelector<P> genericSelector)
MessageFilter with MethodInvokingSelector
for the provided GenericSelector.
Typically used with a Java 8 Lambda expression:
.filter("World"::equals)
P - the source payload type.genericSelector - the GenericSelector to use.IntegrationFlowDefinition.public <P> B filter(java.lang.Class<P> payloadType, org.springframework.integration.core.GenericSelector<P> genericSelector)
MessageFilter with MethodInvokingSelector
for the provided GenericSelector.
Typically used with a Java 8 Lambda expression:
.filter(Date.class, p -> p.after(new Date()))
P - the source payload type.payloadType - the Class for desired payload type.genericSelector - the GenericSelector to use.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P> B filter(org.springframework.integration.core.GenericSelector<P> genericSelector, Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter with MethodInvokingSelector
for the provided GenericSelector.
In addition accept options for the integration endpoint using FilterEndpointSpec.
Typically used with a Java 8 Lambda expression:
.filter("World"::equals, e -> e.autoStartup(false))
P - the source payload type.genericSelector - the GenericSelector to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.FilterEndpointSpecpublic <P> B filter(java.lang.Class<P> payloadType, org.springframework.integration.core.GenericSelector<P> genericSelector, Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter with MethodInvokingSelector
for the provided GenericSelector.
In addition accept options for the integration endpoint using FilterEndpointSpec.
Typically used with a Java 8 Lambda expression:
.filter(Date.class, p -> p.after(new Date()), e -> e.autoStartup(false))
P - the source payload type.payloadType - the Class for desired payload type.genericSelector - the GenericSelector to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
FilterEndpointSpecpublic <H extends org.springframework.messaging.MessageHandler> B handleWithAdapter(Function<Adapters,MessageHandlerSpec<?,H>> adapters)
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Adapters factory.
Typically used with a Java 8 Lambda expression:
.handleWithAdapter(a ->
a.jmsGateway(this.jmsConnectionFactory)
.replyContainer()
.requestDestination("fooQueue"))
H - the target MessageHandler type.adapters - the Function to select and configure protocol specific
MessageHandler.IntegrationFlowDefinition.MessageHandlerSpecpublic <H extends org.springframework.messaging.MessageHandler> B handleWithAdapter(Function<Adapters,MessageHandlerSpec<?,H>> adapters, Consumer<GenericEndpointSpec<H>> endpointConfigurer)
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Adapters factory.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.handleWithAdapter(a ->
a.jmsGateway(this.jmsConnectionFactory)
.replyContainer()
.requestDestination("fooQueue"),
e -> e.autoStartup(false))
H - the target MessageHandler type.adapters - the Function to select and configure protocol specific
MessageHandler.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.MessageHandlerSpec,
GenericEndpointSpecpublic B handle(MessageHandlerSpec<?,? extends org.springframework.messaging.MessageHandler> messageHandlerSpec)
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory:
.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))
messageHandlerSpec - the MessageHandlerSpec to configure protocol specific
MessageHandler.IntegrationFlowDefinition.public B handle(org.springframework.messaging.MessageHandler messageHandler)
ServiceActivatingHandler for the provided
MessageHandler implementation.
Can be used as Java 8 Lambda expression:
.handle(m -> System.out.println(m.getPayload())
messageHandler - the MessageHandler to use.IntegrationFlowDefinition.public B handle(java.lang.String beanName, java.lang.String methodName)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime.beanName - the bean name to use.methodName - the method to invoke.IntegrationFlowDefinition.public B handle(java.lang.String beanName, java.lang.String methodName, Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.beanName - the bean name to use.methodName - the method to invoke.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public <P> B handle(GenericHandler<P> handler)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
Typically used with a Java 8 Lambda expression:
.<Integer>handle((p, h) -> p / 2)
P - the payload type to expect.handler - the handler to invoke.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P> B handle(GenericHandler<P> handler, Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<Integer>handle((p, h) -> p / 2, e -> e.autoStartup(false))
P - the payload type to expect.handler - the handler to invoke.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
GenericEndpointSpecpublic <P> B handle(java.lang.Class<P> payloadType, GenericHandler<P> handler)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
Typically used with a Java 8 Lambda expression:
.handle(Integer.class, (p, h) -> p / 2)
P - the payload type to expect.payloadType - the expected payload type.
The accepted payload can be converted to this one at runtimehandler - the handler to invoke.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P> B handle(java.lang.Class<P> payloadType, GenericHandler<P> handler, Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.handle(Integer.class, (p, h) -> p / 2, e -> e.autoStartup(false))
P - the payload type to expect.payloadType - the expected payload type.
The accepted payload can be converted to this one at runtimehandler - the handler to invoke.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessorpublic <H extends org.springframework.messaging.MessageHandler> B handle(MessageHandlerSpec<?,H> messageHandlerSpec, Consumer<GenericEndpointSpec<H>> endpointConfigurer)
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory:
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"),
e -> e.autoStartup(false))
H - the MessageHandler type.messageHandlerSpec - the MessageHandlerSpec to configure protocol specific
MessageHandler.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public <H extends org.springframework.messaging.MessageHandler> B handle(H messageHandler, Consumer<GenericEndpointSpec<H>> endpointConfigurer)
ServiceActivatingHandler for the provided
MessageHandler implementation.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Can be used as Java 8 Lambda expression:
.handle(m -> System.out.println(m.getPayload(), e -> e.autoStartup(false))
H - the MessageHandler type.messageHandler - the MessageHandler to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B bridge(Consumer<GenericEndpointSpec<org.springframework.integration.handler.BridgeHandler>> endpointConfigurer)
BridgeHandler to the current integration flow position.
Typically used with a Java 8 Lambda expression:
.bridge(s -> s.poller(Pollers.fixedDelay(100))
.autoStartup(false)
.id("priorityChannelBridge"))
endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B delay(java.lang.String groupId)
DelayHandler to the current integration flow position
with default options.groupId - the groupId for delayed messages in the
MessageGroupStore.IntegrationFlowDefinition.public B delay(java.lang.String groupId, Consumer<DelayerEndpointSpec> endpointConfigurer)
DelayHandler to the current integration flow position
with provided options.groupId - the groupId for delayed messages in the
MessageGroupStore.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.DelayerEndpointSpecpublic B delay(java.lang.String groupId, java.lang.String expression)
DelayHandler to the current integration flow position
with provided delayExpression.groupId - the groupId for delayed messages in the
MessageGroupStore.expression - the delay SpEL expression.IntegrationFlowDefinition.public <P> B delay(java.lang.String groupId, Function<org.springframework.messaging.Message<P>,java.lang.Object> function)
DelayHandler to the current integration flow position
with provided delayFunction.P - the expected payload type.groupId - the groupId for delayed messages in the
MessageGroupStore.function - the delay Function.IntegrationFlowDefinition.FunctionExpressionpublic <P> B delay(java.lang.String groupId, Function<org.springframework.messaging.Message<P>,java.lang.Object> function, Consumer<DelayerEndpointSpec> endpointConfigurer)
DelayHandler to the current integration flow position
with provided delayFunction.
Typically used with a Java 8 Lambda expression:
*
.<Foo>delay("delayer", m -> m.getPayload().getDate(),
c -> c.advice(this.delayedAdvice).messageStore(this.messageStore()))
P - the expected payload type.groupId - the groupId for delayed messages in the
MessageGroupStore.function - the delay Function.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.FunctionExpression,
DelayerEndpointSpecpublic B delay(java.lang.String groupId, java.lang.String expression, Consumer<DelayerEndpointSpec> endpointConfigurer)
DelayHandler to the current integration flow position
with provided delayExpression.groupId - the groupId for delayed messages in the
MessageGroupStore.expression - the delay SpEL expression.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.DelayerEndpointSpecpublic B enrich(Consumer<EnricherSpec> enricherConfigurer)
ContentEnricher to the current integration flow position
with provided options.
Typically used with a Java 8 Lambda expression:
.enrich(e -> e.requestChannel("enrichChannel")
.requestPayload(Message::getPayload)
.shouldClonePayload(false)
.<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))
enricherConfigurer - the Consumer to provide ContentEnricher options.IntegrationFlowDefinition.EnricherSpecpublic B enrich(Consumer<EnricherSpec> enricherConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.ContentEnricher>> endpointConfigurer)
ContentEnricher to the current integration flow position
with provided options.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.enrich(e -> e.requestChannel("enrichChannel")
.requestPayload(Message::getPayload)
.shouldClonePayload(false)
.<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")),
e -> e.autoStartup(false))
enricherConfigurer - the Consumer to provide ContentEnricher options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.EnricherSpec,
GenericEndpointSpecpublic B enrichHeaders(MapBuilder<?,java.lang.String,java.lang.Object> headers)
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder.
Can be used together with Namespace Factory:
.enrichHeaders(Mail.headers()
.subjectFunction(m -> "foo")
.from("foo@bar")
.toFunction(m -> new String[] {"bar@baz"}))
headers - the MapBuilder to use.IntegrationFlowDefinition.public B enrichHeaders(MapBuilder<?,java.lang.String,java.lang.Object> headers, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Can be used together with Namespace Factory:
.enrichHeaders(Mail.headers()
.subjectFunction(m -> "foo")
.from("foo@bar")
.toFunction(m -> new String[] {"bar@baz"}),
e -> e.autoStartup(false))
headers - the MapBuilder to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B enrichHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
Map of values to be used for the
Message header enrichment.
values can apply an Expression
to be evaluated against a request Message.headers - the Map of headers to enrich.IntegrationFlowDefinition.public B enrichHeaders(java.util.Map<java.lang.String,java.lang.Object> headers, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Map of values to be used for the
Message header enrichment.
values can apply an Expression
to be evaluated against a request Message.headers - the Map of headers to enrich.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer)
MessageTransformingHandler for
a HeaderEnricher
as the result of provided Consumer.
Typically used with a Java 8 Lambda expression:
.enrichHeaders(h -> h.header(FileHeaders.FILENAME, "foo.sitest")
.header("directory", new File(tmpDir, "fileWritingFlow")))
headerEnricherConfigurer - the Consumer to use.IntegrationFlowDefinition.HeaderEnricherSpecpublic B enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler for
a HeaderEnricher
as the result of provided Consumer.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.enrichHeaders(
s -> s.header("one", new XPathExpressionEvaluatingHeaderValueMessageProcessor("/root/elementOne"))
.header("two", new XPathExpressionEvaluatingHeaderValueMessageProcessor("/root/elementTwo"))
.headerChannelsToString(),
c -> c.autoStartup(false).id("xpathHeaderEnricher"))
headerEnricherConfigurer - the Consumer to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.HeaderEnricherSpec,
GenericEndpointSpecpublic B split()
DefaultMessageSplitter with default options
to the current integration flow position.IntegrationFlowDefinition.public B split(Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.DefaultMessageSplitter>> endpointConfigurer)
DefaultMessageSplitter with provided options
to the current integration flow position.
Typically used with a Java 8 Lambda expression:
.split(s -> s.applySequence(false).get().getT2().setDelimiters(","))
endpointConfigurer - the Consumer to provide integration endpoint options
and for DefaultMessageSplitter.IntegrationFlowDefinition.SplitterEndpointSpecpublic B split(java.lang.String expression, Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.ExpressionEvaluatingSplitter>> endpointConfigurer)
ExpressionEvaluatingSplitter with provided
SpEL expression.expression - the splitter SpEL expression.endpointConfigurer - the Consumer to provide integration endpoint options
and for ExpressionEvaluatingSplitter.IntegrationFlowDefinition.SplitterEndpointSpecpublic B split(java.lang.String beanName, java.lang.String methodName)
MethodInvokingSplitter to evaluate the provided
method of the bean at runtime.beanName - the bean name to use.methodName - the method to invoke at runtime.IntegrationFlowDefinition.public B split(java.lang.String beanName, java.lang.String methodName, Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter to evaluate the provided
method of the bean at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.beanName - the bean name to use.methodName - the method to invoke at runtime.endpointConfigurer - the Consumer to provide integration endpoint options
and for MethodInvokingSplitter.IntegrationFlowDefinition.SplitterEndpointSpecpublic <P> B split(java.lang.Class<P> payloadType, Function<P,?> splitter)
MethodInvokingSplitter to evaluate the provided
Function at runtime.
Typically used with a Java 8 Lambda expression:
.split(String.class, p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2)))))
P - the payload type.payloadType - the expected payload type. Used at runtime to convert received payload type to.splitter - the splitter Function.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P> B split(Function<P,?> splitter, Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter to evaluate the provided
Function at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<String>split(p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2))))
, e -> e.applySequence(false))
P - the payload type.splitter - the splitter Function.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
SplitterEndpointSpecpublic <P> B split(java.lang.Class<P> payloadType, Function<P,?> splitter, Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter to evaluate the provided
Function at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.split(String.class, p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2))))
, e -> e.applySequence(false))
P - the payload type.payloadType - the expected payload type. Used at runtime to convert received payload type to.splitter - the splitter Function.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessor,
SplitterEndpointSpecpublic <S extends org.springframework.integration.splitter.AbstractMessageSplitter> B split(S splitter, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
AbstractMessageSplitter to the current integration
flow position.S - the AbstractMessageSplittersplitter - the AbstractMessageSplitter to populate.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.SplitterEndpointSpecpublic B headerFilter(java.lang.String... headersToRemove)
HeaderFilter to the current StandardIntegrationFlow.headersToRemove - the array of headers (or patterns)
to remove from MessageHeaders.IntegrationFlowDefinition.public B headerFilter(java.lang.String headersToRemove, boolean patternMatch)
HeaderFilter to the current StandardIntegrationFlow.headersToRemove - the comma separated headers (or patterns) to remove from
MessageHeaders.patternMatch - the boolean flag to indicate if headersToRemove
should be interpreted as patterns or direct header names.IntegrationFlowDefinition.public B headerFilter(org.springframework.integration.transformer.HeaderFilter headerFilter, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler for the provided
HeaderFilter.headerFilter - the HeaderFilter to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B claimCheckIn(org.springframework.integration.store.MessageStore messageStore)
MessageTransformingHandler for the ClaimCheckInTransformer
with provided MessageStore.messageStore - the MessageStore to use.IntegrationFlowDefinition.public B claimCheckIn(org.springframework.integration.store.MessageStore messageStore, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler for the ClaimCheckInTransformer
with provided MessageStore.
In addition accept options for the integration endpoint using GenericEndpointSpec.messageStore - the MessageStore to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B claimCheckOut(org.springframework.integration.store.MessageStore messageStore)
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore.
The removeMessage option of ClaimCheckOutTransformer is to false.messageStore - the MessageStore to use.IntegrationFlowDefinition.public B claimCheckOut(org.springframework.integration.store.MessageStore messageStore, boolean removeMessage)
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag.messageStore - the MessageStore to use.removeMessage - the removeMessage boolean flag.IntegrationFlowDefinition.ClaimCheckOutTransformer.setRemoveMessage(boolean)public B claimCheckOut(org.springframework.integration.store.MessageStore messageStore, boolean removeMessage, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag.
In addition accept options for the integration endpoint using GenericEndpointSpec.messageStore - the MessageStore to use.removeMessage - the removeMessage boolean flag.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpec,
ClaimCheckOutTransformer.setRemoveMessage(boolean)public B resequence()
ResequencingMessageHandler with default options.IntegrationFlowDefinition.public B resequence(Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
ResequencingMessageHandler with default options.
In addition accept options for the integration endpoint using GenericEndpointSpec.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B resequence(Consumer<ResequencerSpec> resequencerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
ResequencingMessageHandler with provided options from ResequencerSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.resequence(r -> r.releasePartialSequences(true).correlationExpression("'foo'"),
e -> e.applySequence(false))
resequencerConfigurer - the Consumer to provide ResequencingMessageHandler options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B aggregate()
AggregatingMessageHandler with default options.IntegrationFlowDefinition.public B aggregate(Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
AggregatingMessageHandler with default options.
In addition accept options for the integration endpoint using GenericEndpointSpec.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B aggregate(Consumer<AggregatorSpec> aggregatorConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
AggregatingMessageHandler with provided options from AggregatorSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.aggregate(a -> a.correlationExpression("1").releaseStrategy(g -> g.size() == 25),
e -> e.applySequence(false))
aggregatorConfigurer - the Consumer to provide AggregatingMessageHandler options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.GenericEndpointSpecpublic B route(java.lang.String beanName, java.lang.String method)
MethodInvokingRouter for provided bean and its method
with default options.beanName - the bean to use.method - the method to invoke at runtime.IntegrationFlowDefinition.public B route(java.lang.String beanName, java.lang.String method, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter for provided bean and its method
with provided options from RouterSpec.beanName - the bean to use.method - the method to invoke at runtime.routerConfigurer - the Consumer to provide MethodInvokingRouter options.IntegrationFlowDefinition.public B route(java.lang.String beanName, java.lang.String method, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
MethodInvokingRouter for provided bean and its method
with provided options from RouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.beanName - the bean to use.method - the method to invoke at runtime.routerConfigurer - the Consumer to provide MethodInvokingRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B route(java.lang.String expression)
ExpressionEvaluatingRouter for provided SpEL expression
with default options.expression - the expression to use.IntegrationFlowDefinition.public B route(java.lang.String expression, Consumer<RouterSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> routerConfigurer)
ExpressionEvaluatingRouter for provided SpEL expression
with provided options from RouterSpec.expression - the expression to use.routerConfigurer - the Consumer to provide ExpressionEvaluatingRouter options.IntegrationFlowDefinition.public B route(java.lang.String expression, Consumer<RouterSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.ExpressionEvaluatingRouter>> endpointConfigurer)
ExpressionEvaluatingRouter for provided bean and its method
with provided options from RouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.expression - the expression to use.routerConfigurer - the Consumer to provide ExpressionEvaluatingRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public <S,T> B route(Function<S,T> router)
MethodInvokingRouter for provided Function
with default options.
Typically used with a Java 8 Lambda expression:
.route(p -> p.equals("foo") || p.equals("bar") ? new String[] {"foo", "bar"} : null)
S - the source payload type.T - the target result type.router - the Function to use.IntegrationFlowDefinition.public <S,T> B route(Function<S,T> router, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter for provided Function
with provided options from RouterSpec.
Typically used with a Java 8 Lambda expression:
.<Integer, Boolean>route(p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)))
S - the source payload type.T - the target result type.router - the Function to use.routerConfigurer - the Consumer to provide MethodInvokingRouter options.IntegrationFlowDefinition.public <P,T> B route(java.lang.Class<P> payloadType, Function<P,T> router)
MethodInvokingRouter for provided Function
and payload type with default options.
Typically used with a Java 8 Lambda expression:
.route(Integer.class, p -> p % 2 == 0)
P - the source payload type.T - the target result type.payloadType - the expected payload type.router - the Function to use.IntegrationFlowDefinition.LambdaMessageProcessorpublic <P,T> B route(java.lang.Class<P> payloadType, Function<P,T> router, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter for provided Function
and payload type and options from RouterSpec.
Typically used with a Java 8 Lambda expression:
.route(Integer.class, p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)))
P - the source payload type.T - the target result type.payloadType - the expected payload type.router - the Function to use.routerConfigurer - the Consumer to provide MethodInvokingRouter options.IntegrationFlowDefinition.LambdaMessageProcessorpublic <S,T> B route(Function<S,T> router, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
MethodInvokingRouter for provided Function
with provided options from RouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.<Integer, Boolean>route(p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)),
e -> e.applySequence(false))
S - the source payload type.T - the target result type.router - the Function to use.routerConfigurer - the Consumer to provide MethodInvokingRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public <P,T> B route(java.lang.Class<P> payloadType, Function<P,T> router, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
MethodInvokingRouter for provided Function
and payload type and options from RouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.route(Integer.class, p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)),
e -> e.applySequence(false))
P - the source payload type.T - the target result type.payloadType - the expected payload type.router - the Function to use.routerConfigurer - the Consumer to provide MethodInvokingRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.LambdaMessageProcessorpublic <R extends org.springframework.integration.router.AbstractMappingMessageRouter> B route(R router, Consumer<RouterSpec<R>> routerConfigurer, Consumer<GenericEndpointSpec<R>> endpointConfigurer)
AbstractMappingMessageRouter implementation
with options from RouterSpec and endpoint options from GenericEndpointSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.R - the AbstractMappingMessageRouter type.router - the AbstractMappingMessageRouter to populate.routerConfigurer - the Consumer to provide MethodInvokingRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer)
RecipientListRouter options from RecipientListRouterSpec.
Typically used with a Java 8 Lambda expression:
.routeToRecipients(r -> r
.recipient("bar-channel", m ->
m.getHeaders().containsKey("recipient") && (boolean) m.getHeaders().get("recipient"))
.recipientFlow("'foo' == payload or 'bar' == payload or 'baz' == payload",
f -> f.transform(String.class, p -> p.toUpperCase())
.channel(c -> c.queue("recipientListSubFlow1Result"))))
routerConfigurer - the Consumer to provide RecipientListRouter options.IntegrationFlowDefinition.public B routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.RecipientListRouter>> endpointConfigurer)
RecipientListRouter options from RecipientListRouterSpec.
In addition accept options for the integration endpoint using GenericEndpointSpec.
Typically used with a Java 8 Lambda expression:
.routeToRecipients(r -> r
.recipient("bar-channel", m ->
m.getHeaders().containsKey("recipient") && (boolean) m.getHeaders().get("recipient"))
.recipientFlow("'foo' == payload or 'bar' == payload or 'baz' == payload",
f -> f.transform(String.class, p -> p.toUpperCase())
.channel(c -> c.queue("recipientListSubFlow1Result"))),
e -> e.applySequence(false))
routerConfigurer - the Consumer to provide RecipientListRouter options.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B route(org.springframework.integration.router.AbstractMessageRouter router)
AbstractMessageRouter implementation to the
current integration flow position.router - the AbstractMessageRouter to populate.IntegrationFlowDefinition.public <R extends org.springframework.integration.router.AbstractMessageRouter> B route(R router, Consumer<GenericEndpointSpec<R>> endpointConfigurer)
AbstractMessageRouter implementation to the
current integration flow position.
In addition accept options for the integration endpoint using GenericEndpointSpec.R - the AbstractMessageRouter type.router - the AbstractMessageRouter to populate.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B gateway(java.lang.String requestChannel)
GatewayMessageHandler for the provided
requestChannel to send a request with default options.
Uses RequestReplyExchanger Proxy
on the background.requestChannel - the MessageChannel bean name.IntegrationFlowDefinition.public B gateway(java.lang.String requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler for the provided
requestChannel to send a request with options from GatewayEndpointSpec.
Uses RequestReplyExchanger Proxy
on the background.requestChannel - the MessageChannel bean name.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B gateway(org.springframework.messaging.MessageChannel requestChannel)
GatewayMessageHandler for the provided
requestChannel to send a request with default options.
Uses RequestReplyExchanger Proxy
on the background.requestChannel - the MessageChannel to use.IntegrationFlowDefinition.public B gateway(org.springframework.messaging.MessageChannel requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler for the provided
requestChannel to send a request with options from GatewayEndpointSpec.
Uses RequestReplyExchanger Proxy
on the background.requestChannel - the MessageChannel to use.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.public B gateway(IntegrationFlow flow)
GatewayMessageHandler for the provided
subflow.
Typically used with a Java 8 Lambda expression:
.gateway(f -> f.transform("From Gateway SubFlow: "::concat))
flow - the IntegrationFlow to to send a request message and wait for reply.IntegrationFlowDefinition.public B gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler for the provided
subflow with options from GatewayEndpointSpec.
Typically used with a Java 8 Lambda expression:
.gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L))
flow - the IntegrationFlow to to send a request message and wait for reply.endpointConfigurer - the Consumer to provide integration endpoint options.IntegrationFlowDefinition.protected final B _this()
protected StandardIntegrationFlow get()