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> aggregator)
Populate the
AggregatingMessageHandler with provided options from AggregatorSpec . |
B |
aggregate(Consumer<AggregatorSpec> aggregatorConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
Deprecated.
since 1.1 in favor of
aggregate(Consumer) |
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(MessageProcessorSpec<?> messageProcessorSpec)
Populate a
MessageFilter with MethodInvokingSelector
for the MessageProcessor from
the provided MessageProcessorSpec . |
B |
filter(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector
for the MessageProcessor from
the provided MessageProcessorSpec . |
B |
filter(java.lang.Object service)
Populate a
MessageFilter with MethodInvokingSelector for the
discovered method of the provided service. |
B |
filter(java.lang.Object service,
java.lang.String methodName)
Populate a
MessageFilter with MethodInvokingSelector for the
method of the provided service. |
B |
filter(java.lang.Object service,
java.lang.String methodName,
Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector for the
method of the provided service. |
B |
filter(java.lang.String expression)
Populate a
MessageFilter with MessageSelector for the provided SpEL expression. |
B |
filter(java.lang.String expression,
Consumer<FilterEndpointSpec> endpointConfigurer)
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. |
<H extends org.springframework.messaging.MessageHandler> |
handle(MessageHandlerSpec<?,H> 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(MessageProcessorSpec<?> messageProcessorSpec)
Populate a
ServiceActivatingHandler for the
MessageProcessor from the provided
MessageProcessorSpec . |
B |
handle(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MessageProcessor from the provided
MessageProcessorSpec . |
B |
handle(java.lang.Object service)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the discovered method for provided service at runtime. |
B |
handle(java.lang.Object service,
java.lang.String methodName)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
handle(java.lang.Object service,
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. |
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<ResequencerSpec> resequencer)
Populate the
ResequencingMessageHandler with provided options from ResequencerSpec . |
B |
resequence(Consumer<ResequencerSpec> resequencerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
Deprecated.
since 1.1 in favor of
resequence(Consumer) |
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)
|
B |
route(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MethodInvokingRouter for the MessageProcessor
from the provided MessageProcessorSpec with default options. |
B |
route(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for the MessageProcessor
from the provided MessageProcessorSpec with default options. |
B |
route(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
Populate the
MethodInvokingRouter for the MessageProcessor
from the provided MessageProcessorSpec with default options. |
B |
route(java.lang.Object service)
Populate the
MethodInvokingRouter for the discovered method
of the provided service and its method with default options. |
B |
route(java.lang.Object service,
java.lang.String methodName)
Populate the
MethodInvokingRouter for the method
of the provided service and its method with default options. |
B |
route(java.lang.Object service,
java.lang.String methodName,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for the method
of the provided service and its method with provided options from RouterSpec . |
B |
route(java.lang.Object service,
java.lang.String methodName,
Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer,
Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
Populate the
MethodInvokingRouter for the method
of the provided service and its method with provided options from RouterSpec . |
<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. |
B |
split(org.springframework.integration.splitter.AbstractMessageSplitter splitter)
Populate the provided
AbstractMessageSplitter 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(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
<S extends org.springframework.integration.splitter.AbstractMessageSplitter> |
split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec,
Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
B |
split(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MethodInvokingSplitter to evaluate the
MessageProcessor at runtime
from provided MessageProcessorSpec . |
B |
split(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the
MessageProcessor at runtime
from provided MessageProcessorSpec . |
B |
split(java.lang.Object service)
Populate the
MethodInvokingSplitter to evaluate the discovered
method of the service at runtime. |
B |
split(java.lang.Object service,
java.lang.String methodName)
Populate the
MethodInvokingSplitter to evaluate the provided
method of the service at runtime. |
B |
split(java.lang.Object service,
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. |
<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)
Populate the
ExpressionEvaluatingSplitter with provided
SpEL expression. |
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. |
<T> org.reactivestreams.Publisher<org.springframework.messaging.Message<T>> |
toReactivePublisher()
Represent an Integration Flow as a Reactive Streams
Publisher bean. |
<T> org.reactivestreams.Publisher<org.springframework.messaging.Message<T>> |
toReactivePublisher(java.util.concurrent.Executor executor)
Represent an Integration Flow as a Reactive Streams
Publisher bean. |
<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(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MessageTransformingHandler instance for the
MessageProcessor from provided MessageProcessorSpec . |
B |
transform(MessageProcessorSpec<?> messageProcessorSpec,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance for the
MessageProcessor from provided MessageProcessorSpec . |
B |
transform(java.lang.Object service)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the discovered service method at runtime. |
B |
transform(java.lang.Object service,
java.lang.String methodName)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the service method at runtime. |
B |
transform(java.lang.Object service,
java.lang.String methodName,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the service method at runtime. |
B |
transform(java.lang.String expression)
Populate the
Transformer EI Pattern specific MessageHandler implementation
for the SpEL Expression . |
B |
transform(java.lang.String expression,
Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Populate the
Transformer EI Pattern specific MessageHandler implementation
for the SpEL Expression . |
B |
wireTap(IntegrationFlow flow)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(IntegrationFlow flow,
Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(org.springframework.messaging.MessageChannel wireTapChannel)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(org.springframework.messaging.MessageChannel wireTapChannel,
Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(java.lang.String wireTapChannel)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(java.lang.String wireTapChannel,
Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
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
.MessageChannels
public 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 wireTap(IntegrationFlow flow)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.filter("World"::equals)
.wireTap(sf -> sf.<String, String>transform(String::toUpperCase))
.handle(p -> process(p))
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.flow
- the IntegrationFlow
for wire-tap subflow as an alternative to the wireTapChannel
.IntegrationFlowDefinition
.public B wireTap(java.lang.String wireTapChannel)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
f -> f.wireTap("tapChannel")
.handle(p -> process(p))
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
bean name to wire-tap.IntegrationFlowDefinition
.public B wireTap(org.springframework.messaging.MessageChannel wireTapChannel)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(tapChannel())
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
to wire-tap.IntegrationFlowDefinition
.public B wireTap(IntegrationFlow flow, Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(sf -> sf.<String, String>transform(String::toUpperCase), wt -> wt.selector("payload == 'foo'"))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.flow
- the IntegrationFlow
for wire-tap subflow as an alternative to the wireTapChannel
.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.IntegrationFlowDefinition
.public B wireTap(java.lang.String wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap("tapChannel", wt -> wt.selector(m -> m.getPayload().equals("foo")))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
bean name to wire-tap.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.IntegrationFlowDefinition
.public B wireTap(org.springframework.messaging.MessageChannel wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo")))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
to wire-tap.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.IntegrationFlowDefinition
.public B controlBus()
Control Bus
EI Pattern specific MessageHandler
implementation
at the current IntegrationFlow
chain position.IntegrationFlowDefinition
.ExpressionCommandMessageProcessor
public 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
,
GenericEndpointSpec
public B transform(java.lang.String expression)
Transformer
EI Pattern specific MessageHandler
implementation
for the SpEL Expression
.expression
- the Transformer
Expression
.IntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(java.lang.String expression, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
Transformer
EI Pattern specific MessageHandler
implementation
for the SpEL Expression
.expression
- the Transformer
Expression
.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(java.lang.Object service)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the discovered service method at runtime.service
- the service to use.IntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(java.lang.Object service, java.lang.String methodName)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the service method at runtime.service
- the service to use.methodName
- the method to invoke.IntegrationFlowDefinition
.MethodInvokingTransformer
public B transform(java.lang.Object service, java.lang.String methodName, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the service method at runtime.service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public <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
,
LambdaMessageProcessor
public B transform(MessageProcessorSpec<?> messageProcessorSpec)
MessageTransformingHandler
instance for the
MessageProcessor
from provided MessageProcessorSpec
.
.transform(Scripts.script("classpath:myScript.py").valiable("foo", bar()))
messageProcessorSpec
- the MessageProcessorSpec
to use.IntegrationFlowDefinition
.MethodInvokingTransformer
public B transform(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<org.springframework.integration.transformer.MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
instance for the
MessageProcessor
from provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.transform(Scripts.script("classpath:myScript.py").valiable("foo", bar()),
e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.MethodInvokingTransformer
public <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
,
LambdaMessageProcessor
public <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
,
GenericEndpointSpec
public <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
,
GenericEndpointSpec
public B filter(java.lang.String expression)
MessageFilter
with MessageSelector
for the provided SpEL expression.expression
- the SpEL expression.IntegrationFlowDefinition
.public B filter(java.lang.String expression, Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MessageSelector
for the provided SpEL expression.
In addition accept options for the integration endpoint using FilterEndpointSpec
:
.filter("payload.hot"), e -> e.autoStartup(false))
expression
- the SpEL expression.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.FilterEndpointSpec
public B filter(java.lang.Object service)
MessageFilter
with MethodInvokingSelector
for the
discovered method of the provided service.service
- the service to use.IntegrationFlowDefinition
.MethodInvokingSelector
public B filter(java.lang.Object service, java.lang.String methodName)
MessageFilter
with MethodInvokingSelector
for the
method of the provided service.service
- the service to use.methodName
- the method to invokeIntegrationFlowDefinition
.MethodInvokingSelector
public B filter(java.lang.Object service, java.lang.String methodName, Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the
method of the provided service.service
- the service to use.methodName
- the method to invokeendpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.MethodInvokingSelector
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 B filter(MessageProcessorSpec<?> messageProcessorSpec)
MessageFilter
with MethodInvokingSelector
for the MessageProcessor
from
the provided MessageProcessorSpec
.
.filter(Scripts.script(scriptResource).lang("ruby"))
messageProcessorSpec
- the MessageProcessorSpec
to use.IntegrationFlowDefinition
.public B filter(MessageProcessorSpec<?> messageProcessorSpec, Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the MessageProcessor
from
the provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using FilterEndpointSpec
.
.filter(Scripts.script(scriptResource).lang("ruby"),
e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.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
.LambdaMessageProcessor
public <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
.FilterEndpointSpec
public <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
,
FilterEndpointSpec
public <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
.MessageHandlerSpec
public <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
,
GenericEndpointSpec
public <H extends org.springframework.messaging.MessageHandler> B handle(MessageHandlerSpec<?,H> messageHandlerSpec)
ServiceActivatingHandler
for the selected protocol specific
MessageHandler
implementation from Namespace Factory
:
.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))
H
- the target MessageHandler
type.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 B handle(java.lang.Object service)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the discovered method
for provided service
at runtime.service
- the service object to use.IntegrationFlowDefinition
.public B handle(java.lang.Object service, java.lang.String methodName)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the method
for provided bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.service
- the service object to use.methodName
- the method to invoke.IntegrationFlowDefinition
.public B handle(java.lang.Object service, 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
.service
- the service object 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
.LambdaMessageProcessor
public <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
,
GenericEndpointSpec
public <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
.LambdaMessageProcessor
public <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
.LambdaMessageProcessor
public B handle(MessageProcessorSpec<?> messageProcessorSpec)
ServiceActivatingHandler
for the
MessageProcessor
from the provided
MessageProcessorSpec
.
.handle(Scripts.script("classpath:myScript.ruby"))
messageProcessorSpec
- the MessageProcessorSpec
to use.IntegrationFlowDefinition
.public B handle(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<org.springframework.integration.handler.ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
for the
MessageProcessor
from the provided
MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.handle(Scripts.script("classpath:myScript.ruby"), e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.public <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
.GenericEndpointSpec
public 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
.DelayerEndpointSpec
public 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
.FunctionExpression
public <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
,
DelayerEndpointSpec
public 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
.DelayerEndpointSpec
public 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
.EnricherSpec
public 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
,
GenericEndpointSpec
public 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
.GenericEndpointSpec
public 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
.GenericEndpointSpec
public 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
.HeaderEnricherSpec
public 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
,
GenericEndpointSpec
public 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
.SplitterEndpointSpec
public B split(java.lang.String expression)
ExpressionEvaluatingSplitter
with provided
SpEL expression.expression
- the splitter SpEL expression.
and for ExpressionEvaluatingSplitter
.IntegrationFlowDefinition
.SplitterEndpointSpec
public 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
.SplitterEndpointSpec
public B split(java.lang.Object service)
MethodInvokingSplitter
to evaluate the discovered
method
of the service
at runtime.service
- the service to use.IntegrationFlowDefinition
.MethodInvokingSplitter
public B split(java.lang.Object service, java.lang.String methodName)
MethodInvokingSplitter
to evaluate the provided
method
of the service
at runtime.service
- the service to use.methodName
- the method to invoke.IntegrationFlowDefinition
.MethodInvokingSplitter
public B split(java.lang.Object service, 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
.service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for MethodInvokingSplitter
.IntegrationFlowDefinition
.SplitterEndpointSpec
,
MethodInvokingSplitter
public 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
.SplitterEndpointSpec
public B split(MessageProcessorSpec<?> messageProcessorSpec)
MethodInvokingSplitter
to evaluate the
MessageProcessor
at runtime
from provided MessageProcessorSpec
.
.split(Scripts.script("classpath:myScript.ruby"))
messageProcessorSpec
- the splitter MessageProcessorSpec
.IntegrationFlowDefinition
.SplitterEndpointSpec
,
ScriptSpec
public B split(MessageProcessorSpec<?> messageProcessorSpec, Consumer<SplitterEndpointSpec<org.springframework.integration.splitter.MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter
to evaluate the
MessageProcessor
at runtime
from provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.split(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000),
, e -> e.applySequence(false))
messageProcessorSpec
- the splitter MessageProcessorSpec
.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for MethodInvokingSplitter
.IntegrationFlowDefinition
.SplitterEndpointSpec
,
ScriptSpec
public <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
.LambdaMessageProcessor
public <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
,
SplitterEndpointSpec
public <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
,
SplitterEndpointSpec
public <S extends org.springframework.integration.splitter.AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitterMessageHandlerSpec
- the MessageHandlerSpec
to populate.IntegrationFlowDefinition
.SplitterEndpointSpec
public <S extends org.springframework.integration.splitter.AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitterMessageHandlerSpec
- the MessageHandlerSpec
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.SplitterEndpointSpec
public B split(org.springframework.integration.splitter.AbstractMessageSplitter splitter)
AbstractMessageSplitter
to the current integration
flow position.splitter
- the AbstractMessageSplitter
to populate.IntegrationFlowDefinition
.SplitterEndpointSpec
public <S extends org.springframework.integration.splitter.AbstractMessageSplitter> B split(S splitter, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitter
- the AbstractMessageSplitter
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.SplitterEndpointSpec
public 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
.GenericEndpointSpec
public 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
.GenericEndpointSpec
public 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
.@Deprecated public B resequence(Consumer<ResequencerSpec> resequencerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.ResequencingMessageHandler>> endpointConfigurer)
resequence(Consumer)
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.phase(100))
resequencerConfigurer
- the Consumer
to provide ResequencingMessageHandler
options.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.GenericEndpointSpec
public B resequence(Consumer<ResequencerSpec> resequencer)
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'")
.phase(100))
resequencer
- the Consumer
to provide ResequencingMessageHandler
options.IntegrationFlowDefinition
.ResequencerSpec
public B aggregate()
AggregatingMessageHandler
with default options.IntegrationFlowDefinition
.@Deprecated public B aggregate(Consumer<AggregatorSpec> aggregatorConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.aggregator.AggregatingMessageHandler>> endpointConfigurer)
aggregate(Consumer)
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
.GenericEndpointSpec
public B aggregate(Consumer<AggregatorSpec> aggregator)
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)
.phase(100))
aggregator
- the Consumer
to provide AggregatingMessageHandler
options.IntegrationFlowDefinition
.AggregatorSpec
public 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.Object service)
MethodInvokingRouter
for the discovered method
of the provided service and its method with default options.service
- the bean to use.IntegrationFlowDefinition
.MethodInvokingRouter
public B route(java.lang.Object service, java.lang.String methodName)
MethodInvokingRouter
for the method
of the provided service and its method with default options.service
- the service to use.methodName
- the method to invoke.IntegrationFlowDefinition
.MethodInvokingRouter
public B route(java.lang.Object service, java.lang.String methodName, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for the method
of the provided service and its method with provided options from RouterSpec
.service
- the service to use.methodName
- the method to invoke.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.IntegrationFlowDefinition
.MethodInvokingRouter
public B route(java.lang.Object service, java.lang.String methodName, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
MethodInvokingRouter
for the method
of the provided service and its method with provided options from RouterSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.service
- the service to use.methodName
- the method to invoke.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.MethodInvokingRouter
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
.LambdaMessageProcessor
public <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
.LambdaMessageProcessor
public <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
.LambdaMessageProcessor
public B route(MessageProcessorSpec<?> messageProcessorSpec)
MethodInvokingRouter
for the MessageProcessor
from the provided MessageProcessorSpec
with default options.
.route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000))
messageProcessorSpec
- the MessageProcessorSpec
to use.IntegrationFlowDefinition
.public B route(MessageProcessorSpec<?> messageProcessorSpec, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for the MessageProcessor
from the provided MessageProcessorSpec
with default options.
.route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000),
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)))
messageProcessorSpec
- the MessageProcessorSpec
to use.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.IntegrationFlowDefinition
.public B route(MessageProcessorSpec<?> messageProcessorSpec, Consumer<RouterSpec<org.springframework.integration.router.MethodInvokingRouter>> routerConfigurer, Consumer<GenericEndpointSpec<org.springframework.integration.router.MethodInvokingRouter>> endpointConfigurer)
MethodInvokingRouter
for the MessageProcessor
from the provided MessageProcessorSpec
with default options.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000),
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)),
e -> e.applySequence(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.endpointConfigurer
- the Consumer
to provide integration endpoint options.IntegrationFlowDefinition
.public <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
.public <T> org.reactivestreams.Publisher<org.springframework.messaging.Message<T>> toReactivePublisher()
Publisher
bean.T
- the payload
typePublisher
public <T> org.reactivestreams.Publisher<org.springframework.messaging.Message<T>> toReactivePublisher(java.util.concurrent.Executor executor)
Publisher
bean.T
- the payload
typeexecutor
- the managed Executor
to be used for the background task to
poll messages from the PollableChannel
.
Defaults to Executors.newSingleThreadExecutor()
.Publisher
protected final B _this()
protected StandardIntegrationFlow get()