Class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlowDefinition<B>>
- Type Parameters:
B
- theBaseIntegrationFlowDefinition
implementation type.
- Direct Known Subclasses:
IntegrationFlowDefinition
@IntegrationDsl public abstract class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlowDefinition<B>> extends 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.- Since:
- 5.2.1
- Author:
- Artem Bilan, Gary Russell, Gabriele Del Prete, Tim Feuerbach
- See Also:
IntegrationFlowBeanPostProcessor
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseIntegrationFlowDefinition.ReplyProducerCleaner
-
Field Summary
Fields Modifier and Type Field Description protected Map<Object,String>
integrationComponents
protected static SpelExpressionParser
PARSER
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseIntegrationFlowDefinition()
-
Method Summary
Modifier and Type Method Description protected B
_this()
protected B
addComponent(Object component)
protected B
addComponent(Object component, String beanName)
protected B
addComponents(Map<Object,String> components)
B
aggregate()
Populate theAggregatingMessageHandler
with default options.B
aggregate(Object aggregatorProcessor)
A short-cut for theaggregate((aggregator) -> aggregator.processor(aggregatorProcessor))
.B
aggregate(Consumer<AggregatorSpec> aggregator)
Populate theAggregatingMessageHandler
with provided options fromAggregatorSpec
.B
barrier(long timeout)
Populate aBarrierMessageHandler
instance for provided timeout.B
barrier(long timeout, Consumer<BarrierSpec> barrierConfigurer)
Populate aBarrierMessageHandler
instance for provided timeout and options fromBarrierSpec
and endpoint options fromGenericEndpointSpec
.B
bridge()
Populate aBridgeHandler
to the current integration flow position.B
bridge(Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer)
Populate aBridgeHandler
to the current integration flow position.B
channel(String messageChannelName)
Populate aMessageChannelReference
instance at the currentIntegrationFlow
chain position.B
channel(Function<Channels,MessageChannelSpec<?,?>> channels)
Populate aMessageChannel
instance at the currentIntegrationFlow
chain position using theChannels
factory fluent API.B
channel(MessageChannelSpec<?,?> messageChannelSpec)
Populate aMessageChannel
instance at the currentIntegrationFlow
chain position using theMessageChannelSpec
fluent API.B
channel(MessageChannel messageChannel)
Populate the providedMessageChannel
instance at the currentIntegrationFlow
chain position.protected void
checkReuse(MessageProducer replyHandler)
B
claimCheckIn(MessageStore messageStore)
B
claimCheckIn(MessageStore messageStore, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
B
claimCheckOut(MessageStore messageStore)
Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
.B
claimCheckOut(MessageStore messageStore, boolean removeMessage)
Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
andremoveMessage
flag.B
claimCheckOut(MessageStore messageStore, boolean removeMessage, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
andremoveMessage
flag.B
controlBus()
Populate theControl Bus
EI Pattern specificMessageHandler
implementation at the currentIntegrationFlow
chain position.B
controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate theControl Bus
EI Pattern specificMessageHandler
implementation at the currentIntegrationFlow
chain position.<P> B
convert(Class<P> payloadType)
Populate theMessageTransformingHandler
instance for the providedpayloadType
to convert at runtime.<P> B
convert(Class<P> payloadType, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate theMessageTransformingHandler
instance for the providedpayloadType
to convert at runtime.protected B
currentComponent(Object component)
protected InterceptableChannel
currentInterceptableChannel()
Return the current channel if it is anInterceptableChannel
, otherwise register a new implicitDirectChannel
in the flow and return that one.protected B
currentMessageChannel(MessageChannel currentMessageChannel)
B
delay(String groupId)
Populate aDelayHandler
to the current integration flow position with default options.B
delay(String groupId, Consumer<DelayerEndpointSpec> endpointConfigurer)
Populate aDelayHandler
to the current integration flow position.B
enrich(Consumer<EnricherSpec> enricherConfigurer)
Populate aContentEnricher
to the current integration flow position with provided options.B
enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer)
B
enrichHeaders(Map<String,Object> headers)
B
enrichHeaders(Map<String,Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
B
enrichHeaders(MapBuilder<?,String,Object> headers)
Populate aMessageTransformingHandler
for aHeaderEnricher
using header values from providedMapBuilder
.B
enrichHeaders(MapBuilder<?,String,Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate aMessageTransformingHandler
for aHeaderEnricher
using header values from providedMapBuilder
.protected static Object
extractProxyTarget(Object target)
<P> B
filter(Class<P> expectedType, GenericSelector<P> genericSelector)
<P> B
filter(Class<P> expectedType, GenericSelector<P> genericSelector, Consumer<FilterEndpointSpec> endpointConfigurer)
B
filter(Object service)
Populate aMessageFilter
withMethodInvokingSelector
for the discovered method of the provided service.B
filter(Object service, String methodName)
Populate aMessageFilter
withMethodInvokingSelector
for the method of the provided service.B
filter(Object service, String methodName, Consumer<FilterEndpointSpec> endpointConfigurer)
Populate aMessageFilter
withMethodInvokingSelector
for the method of the provided service.B
filter(String expression)
Populate aMessageFilter
withMessageSelector
for the provided SpEL expression.B
filter(String expression, Consumer<FilterEndpointSpec> endpointConfigurer)
Populate aMessageFilter
withMessageSelector
for the provided SpEL expression.B
filter(MessageProcessorSpec<?> messageProcessorSpec)
Populate aMessageFilter
withMethodInvokingSelector
for theMessageProcessor
from the providedMessageProcessorSpec
.B
filter(MessageProcessorSpec<?> messageProcessorSpec, Consumer<FilterEndpointSpec> endpointConfigurer)
Populate aMessageFilter
withMethodInvokingSelector
for theMessageProcessor
from the providedMessageProcessorSpec
.B
fixedSubscriberChannel()
Populate anFixedSubscriberChannel
instance at the currentIntegrationFlow
chain position.B
fixedSubscriberChannel(String messageChannelName)
Populate anFixedSubscriberChannel
instance at the currentIntegrationFlow
chain position.<I, O> B
fluxTransform(Function<? super reactor.core.publisher.Flux<Message<I>>,? extends org.reactivestreams.Publisher<O>> fluxFunction)
Populate aFluxMessageChannel
to start a reactive processing for upstream data, wrap it to aFlux
, apply providedFunction
viaFlux.transform(Function)
and emit the result to one moreFluxMessageChannel
, subscribed in the downstream flow.B
gateway(String requestChannel)
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with default options.B
gateway(String requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with options fromGatewayEndpointSpec
.B
gateway(IntegrationFlow flow)
Populate the "artificial"GatewayMessageHandler
for the providedsubflow
.B
gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"GatewayMessageHandler
for the providedsubflow
with options fromGatewayEndpointSpec
.B
gateway(MessageChannel requestChannel)
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with default options.B
gateway(MessageChannel requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with options fromGatewayEndpointSpec
.protected StandardIntegrationFlow
get()
protected Object
getCurrentComponent()
protected MessageChannel
getCurrentMessageChannel()
protected Map<Object,String>
getIntegrationComponents()
<H extends MessageHandler>
Bhandle(H messageHandler, Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate aServiceActivatingHandler
for the providedMessageHandler
implementation.<P> B
handle(Class<P> expectedType, GenericHandler<P> handler)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the providedGenericHandler
at runtime.<P> B
handle(Class<P> expectedType, GenericHandler<P> handler, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the providedGenericHandler
at runtime.B
handle(Object service)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the discoveredmethod
for providedservice
at runtime.B
handle(Object service, String methodName)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime.B
handle(Object service, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime.B
handle(String beanName, String methodName)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime.B
handle(String beanName, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime.<H extends MessageHandler>
Bhandle(MessageHandlerSpec<?,H> messageHandlerSpec)
Populate aServiceActivatingHandler
for the selected protocol specificMessageHandler
implementation fromNamespace Factory
:<H extends MessageHandler>
Bhandle(MessageHandlerSpec<?,H> messageHandlerSpec, Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate aServiceActivatingHandler
for the selected protocol specificMessageHandler
implementation fromNamespace Factory
: In addition accept options for the integration endpoint usingGenericEndpointSpec
.B
handle(MessageProcessorSpec<?> messageProcessorSpec)
Populate aServiceActivatingHandler
for theMessageProcessor
from the providedMessageProcessorSpec
.B
handle(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
for theMessageProcessor
from the providedMessageProcessorSpec
.B
handle(MessageHandler messageHandler)
Populate aServiceActivatingHandler
for the providedMessageHandler
implementation.B
headerFilter(String... headersToRemove)
Provide theHeaderFilter
to the currentStandardIntegrationFlow
.B
headerFilter(String headersToRemove, boolean patternMatch)
Provide theHeaderFilter
to the currentStandardIntegrationFlow
.B
headerFilter(HeaderFilter headerFilter, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the providedMessageTransformingHandler
for the providedHeaderFilter
.B
intercept(ChannelInterceptor... interceptorArray)
Add one or moreChannelInterceptor
implementations to the currentcurrentMessageChannel
, in the given order, after any interceptors already registered.protected boolean
isImplicitChannel()
protected boolean
isOutputChannelRequired()
B
log()
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.B
log(String category)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the provided logging category andINFO
logging level.<P> B
log(String category, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, the provided logging category andFunction
for the log message.B
log(String category, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
LoggingHandler.Level
logging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.<P> B
log(Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.B
log(Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.B
log(LoggingHandler.Level level)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for providedLoggingHandler.Level
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.B
log(LoggingHandler.Level level, String category)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level and logging category.B
log(LoggingHandler.Level level, String category, String logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.<P> B
log(LoggingHandler.Level level, String category, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category andFunction
for the log message.B
log(LoggingHandler.Level level, String category, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.<P> B
log(LoggingHandler.Level level, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.B
log(LoggingHandler.Level level, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.IntegrationFlow
logAndReply()
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.IntegrationFlow
logAndReply(String category)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the provided logging category andINFO
logging level.<P> IntegrationFlow
logAndReply(String category, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, the provided logging category andFunction
for the log message.IntegrationFlow
logAndReply(String category, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
LoggingHandler.Level
logging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.<P> IntegrationFlow
logAndReply(Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.IntegrationFlow
logAndReply(Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.IntegrationFlow
logAndReply(LoggingHandler.Level level)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for providedLoggingHandler.Level
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.IntegrationFlow
logAndReply(LoggingHandler.Level level, String category)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level and logging category.IntegrationFlow
logAndReply(LoggingHandler.Level level, String category, String logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.<P> IntegrationFlow
logAndReply(LoggingHandler.Level level, String category, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category andFunction
for the log message.IntegrationFlow
logAndReply(LoggingHandler.Level level, String category, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.<P> IntegrationFlow
logAndReply(LoggingHandler.Level level, Function<Message<P>,Object> function)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.IntegrationFlow
logAndReply(LoggingHandler.Level level, Expression logExpression)
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.IntegrationFlow
nullChannel()
Add a "nullChannel" bean into this flow definition as a terminal operator.protected MessageChannel
obtainInputChannelFromFlow(IntegrationFlow flow)
B
publishSubscribeChannel(Executor executor, Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
ThePublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.B
publishSubscribeChannel(Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
ThePublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.B
publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel, Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer)
TheBroadcastCapableChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.protected <S extends ConsumerEndpointSpec<? super S, ? extends MessageHandler>>
Bregister(S endpointSpec, Consumer<S> endpointConfigurer)
protected B
registerOutputChannelIfCan(MessageChannel outputChannel)
B
resequence()
Populate theResequencingMessageHandler
with default options.B
resequence(Consumer<ResequencerSpec> resequencer)
Populate theResequencingMessageHandler
with provided options fromResequencerSpec
.<P, T> B
route(Class<P> expectedType, Function<P,T> router, Consumer<RouterSpec<T,MethodInvokingRouter>> routerConfigurer)
Populate theMethodInvokingRouter
for providedFunction
and payload type and options fromRouterSpec
.<S, T> B
route(Class<S> expectedType, Function<S,T> router)
Populate theMethodInvokingRouter
for providedFunction
and payload type with default options.B
route(Object service)
Populate theMethodInvokingRouter
for the discovered method of the provided service and its method with default options.B
route(Object service, String methodName)
Populate theMethodInvokingRouter
for the method of the provided service and its method with default options.B
route(Object service, String methodName, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate theMethodInvokingRouter
for the method of the provided service and its method with provided options fromRouterSpec
.B
route(String expression)
Populate theExpressionEvaluatingRouter
for provided SpEL expression with default options.B
route(String beanName, String method)
Populate theMethodInvokingRouter
for provided bean and its method with default options.B
route(String beanName, String method, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate theMethodInvokingRouter
for provided bean and its method with provided options fromRouterSpec
.<T> B
route(String expression, Consumer<RouterSpec<T,ExpressionEvaluatingRouter>> routerConfigurer)
Populate theExpressionEvaluatingRouter
for provided SpEL expression with provided options fromRouterSpec
.B
route(MessageProcessorSpec<?> messageProcessorSpec)
Populate theMethodInvokingRouter
for theMessageProcessor
from the providedMessageProcessorSpec
with default options.B
route(MessageProcessorSpec<?> messageProcessorSpec, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate theMethodInvokingRouter
for theMessageProcessor
from the providedMessageProcessorSpec
with default options.B
route(AbstractMessageRouter router)
Populate the providedAbstractMessageRouter
implementation to the current integration flow position.<R extends AbstractMessageRouter>
Broute(R router, Consumer<GenericEndpointSpec<R>> endpointConfigurer)
Populate the providedAbstractMessageRouter
implementation to the current integration flow position.protected <R extends AbstractMessageRouter, S extends AbstractRouterSpec<? super S, R>>
Broute(S routerSpec, Consumer<S> routerConfigurer)
B
routeByException(Consumer<RouterSpec<Class<? extends Throwable>,ErrorMessageExceptionTypeRouter>> routerConfigurer)
Populate theErrorMessageExceptionTypeRouter
with options from theRouterSpec
.B
routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer)
Populate theRecipientListRouter
with options from theRecipientListRouterSpec
.B
scatterGather(Consumer<RecipientListRouterSpec> scatterer)
Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function and defaultAggregatorSpec
for gathering function.B
scatterGather(Consumer<RecipientListRouterSpec> scatterer, Consumer<AggregatorSpec> gatherer)
Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function andAggregatorSpec
for gathering function.B
scatterGather(Consumer<RecipientListRouterSpec> scatterer, Consumer<AggregatorSpec> gatherer, Consumer<ScatterGatherSpec> scatterGather)
Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function andAggregatorSpec
for gathering function.B
scatterGather(MessageChannel scatterChannel)
Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function and defaultAggregatorSpec
for gathering function.B
scatterGather(MessageChannel scatterChannel, Consumer<AggregatorSpec> gatherer)
Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function andAggregatorSpec
for gathering function.B
scatterGather(MessageChannel scatterChannel, Consumer<AggregatorSpec> gatherer, Consumer<ScatterGatherSpec> scatterGather)
Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function andAggregatorSpec
for gathering function.protected void
setImplicitChannel(boolean implicitChannel)
B
split()
Populate theDefaultMessageSplitter
with default options to the current integration flow position.<P> B
split(Class<P> expectedType, Function<P,?> splitter)
Populate theMethodInvokingSplitter
to evaluate the providedFunction
at runtime.<P> B
split(Class<P> expectedType, Function<P,?> splitter, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
Populate theMethodInvokingSplitter
to evaluate the providedFunction
at runtime.B
split(Object service)
B
split(Object service, String methodName)
B
split(Object service, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
B
split(String expression)
Populate theExpressionEvaluatingSplitter
with provided SpEL expression.B
split(String beanName, String methodName)
B
split(String beanName, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
B
split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer)
Populate theExpressionEvaluatingSplitter
with provided SpEL expression.B
split(Consumer<SplitterEndpointSpec<DefaultMessageSplitter>> endpointConfigurer)
Populate theDefaultMessageSplitter
with provided options to the current integration flow position.<S extends AbstractMessageSplitter>
Bsplit(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)
Populate the providedAbstractMessageSplitter
to the current integration flow position.<S extends AbstractMessageSplitter>
Bsplit(MessageHandlerSpec<?,S> splitterMessageHandlerSpec, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the providedAbstractMessageSplitter
to the current integration flow position.B
split(MessageProcessorSpec<?> messageProcessorSpec)
Populate theMethodInvokingSplitter
to evaluate theMessageProcessor
at runtime from providedMessageProcessorSpec
.B
split(MessageProcessorSpec<?> messageProcessorSpec, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
Populate theMethodInvokingSplitter
to evaluate theMessageProcessor
at runtime from providedMessageProcessorSpec
.B
split(AbstractMessageSplitter splitter)
Populate the providedAbstractMessageSplitter
to the current integration flow position.<S extends AbstractMessageSplitter>
Bsplit(S splitter, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the providedAbstractMessageSplitter
to the current integration flow position.IntegrationFlow
to(IntegrationFlow other)
Finish this flow with delegation to otherIntegrationFlow
instance.protected <T> org.reactivestreams.Publisher<Message<T>>
toReactivePublisher()
Represent an Integration Flow as a Reactive StreamsPublisher
bean.protected <T> org.reactivestreams.Publisher<Message<T>>
toReactivePublisher(boolean autoStartOnSubscribe)
Represent an Integration Flow as a Reactive StreamsPublisher
bean.<P, T> B
transform(Class<P> expectedType, GenericTransformer<P,T> genericTransformer)
Populate theMessageTransformingHandler
instance for the providedGenericTransformer
for the specificexpectedType
to convert at runtime.<P, T> B
transform(Class<P> expectedType, GenericTransformer<P,T> genericTransformer, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate theMessageTransformingHandler
instance for the providedGenericTransformer
for the specificexpectedType
to convert at runtime.B
transform(Object service)
Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the discovered service method at runtime.B
transform(Object service, String methodName)
Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the service method at runtime.B
transform(Object service, String methodName, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the service method at runtime.B
transform(String expression)
B
transform(String expression, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
B
transform(MessageProcessorSpec<?> messageProcessorSpec)
Populate theMessageTransformingHandler
instance for theMessageProcessor
from providedMessageProcessorSpec
.B
transform(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate theMessageTransformingHandler
instance for theMessageProcessor
from providedMessageProcessorSpec
.B
trigger(String triggerActionId)
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
.B
trigger(String triggerActionId, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
and endpoint options fromGenericEndpointSpec
.B
trigger(MessageTriggerAction triggerAction)
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
.B
trigger(MessageTriggerAction triggerAction, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
and endpoint options fromGenericEndpointSpec
.B
wireTap(String wireTapChannel)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(String wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(IntegrationFlow flow)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(IntegrationFlow flow, Consumer<WireTapSpec> wireTapConfigurer)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(WireTapSpec wireTapSpec)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(MessageChannel wireTapChannel)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.B
wireTap(MessageChannel wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer)
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.
-
Field Details
-
Constructor Details
-
BaseIntegrationFlowDefinition
protected BaseIntegrationFlowDefinition()
-
-
Method Details
-
addComponent
-
addComponent
-
addComponents
-
getIntegrationComponents
-
currentComponent
-
getCurrentComponent
-
currentMessageChannel
-
getCurrentMessageChannel
-
currentInterceptableChannel
Return the current channel if it is anInterceptableChannel
, otherwise register a new implicitDirectChannel
in the flow and return that one.- Returns:
- the current channel after the operation
-
setImplicitChannel
protected void setImplicitChannel(boolean implicitChannel) -
isImplicitChannel
protected boolean isImplicitChannel() -
fixedSubscriberChannel
Populate anFixedSubscriberChannel
instance at the currentIntegrationFlow
chain position. The 'bean name' will be generated during the bean registration phase.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
fixedSubscriberChannel
Populate anFixedSubscriberChannel
instance at the currentIntegrationFlow
chain position. The providedmessageChannelName
is used for the bean registration.- Parameters:
messageChannelName
- the bean name to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
channel
Populate aMessageChannelReference
instance at the currentIntegrationFlow
chain position. The providedmessageChannelName
is used for the bean registration (DirectChannel
), if there is no such a bean in the application context. Otherwise the existingMessageChannel
bean is used to wire integration endpoints.- Parameters:
messageChannelName
- the bean name to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
channel
Populate aMessageChannel
instance at the currentIntegrationFlow
chain position using theMessageChannelSpec
fluent API.- Parameters:
messageChannelSpec
- theMessageChannelSpec
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MessageChannels
-
channel
Populate the providedMessageChannel
instance at the currentIntegrationFlow
chain position. ThemessageChannel
can be an existing bean, or fresh instance, in which case theIntegrationFlowBeanPostProcessor
will populate it as a bean with a generated name.- Parameters:
messageChannel
- theMessageChannel
to populate.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
channel
Populate aMessageChannel
instance at the currentIntegrationFlow
chain position using theChannels
factory fluent API.- Parameters:
channels
- theFunction
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
publishSubscribeChannel
ThePublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.- Parameters:
publishSubscribeChannelConfigurer
- theConsumer
to specifyPublishSubscribeSpec
options including 'subflow' definition.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
publishSubscribeChannel
public B publishSubscribeChannel(Executor executor, Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)ThePublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. Use the providedExecutor
for the target subscribers.- Parameters:
executor
- theExecutor
to use.publishSubscribeChannelConfigurer
- theConsumer
to specifyPublishSubscribeSpec
options including 'subflow' definition.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
publishSubscribeChannel
public B publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel, Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer)TheBroadcastCapableChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.- Parameters:
broadcastCapableChannel
- theBroadcastCapableChannel
to subscriber sub-flows to.publishSubscribeChannelConfigurer
- theConsumer
to specifyBroadcastPublishSubscribeSpec
'subflow' definitions.- Returns:
- the current
BaseIntegrationFlowDefinition
. - Since:
- 5.3
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:.filter("World"::equals) .wireTap(sf -> sf.<String, String>transform(String::toUpperCase)) .handle(p -> process(p))
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
flow
- theIntegrationFlow
for wire-tap subflow as an alternative to thewireTapChannel
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:f -> f.wireTap("tapChannel") .handle(p -> process(p))
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
wireTapChannel
- theMessageChannel
bean name to wire-tap.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:.transform("payload") .wireTap(tapChannel()) .channel("foo")
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
wireTapChannel
- theMessageChannel
to wire-tap.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:.transform("payload") .wireTap(sf -> sf.<String, String>transform(String::toUpperCase), wt -> wt.selector("payload == 'foo'")) .channel("foo")
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
flow
- theIntegrationFlow
for wire-tap subflow as an alternative to thewireTapChannel
.wireTapConfigurer
- theConsumer
to accept options for theWireTap
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
obtainInputChannelFromFlow
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:.transform("payload") .wireTap("tapChannel", wt -> wt.selector(m -> m.getPayload().equals("foo"))) .channel("foo")
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
wireTapChannel
- theMessageChannel
bean name to wire-tap.wireTapConfigurer
- theConsumer
to accept options for theWireTap
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
. It is useful when an implicitMessageChannel
is used between endpoints:.transform("payload") .wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo"))) .channel("foo")
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
wireTapChannel
- theMessageChannel
to wire-tap.wireTapConfigurer
- theConsumer
to accept options for theWireTap
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
wireTap
Populate theWire Tap
EI Pattern specificChannelInterceptor
implementation to the currentcurrentMessageChannel
.It is useful when an implicit
MessageChannel
is used between endpoints:.transform("payload") .wireTap(new WireTap(tapChannel()).selector(m -> m.getPayload().equals("foo"))) .channel("foo")
channel(java.lang.String)
for explicitMessageChannel
, but with the caution do not impact existingChannelInterceptor
s.- Parameters:
wireTapSpec
- theWireTapSpec
to use.When this EIP-method is used in the end of flow, it appends
nullChannel
to terminate flow properly, OtherwiseDispatcher has no subscribers
exception is thrown for implicitDirectChannel
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
controlBus
Populate theControl Bus
EI Pattern specificMessageHandler
implementation at the currentIntegrationFlow
chain position.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionCommandMessageProcessor
-
controlBus
Populate theControl Bus
EI Pattern specificMessageHandler
implementation at the currentIntegrationFlow
chain position.- Parameters:
endpointConfigurer
- theConsumer
to accept integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionCommandMessageProcessor
,GenericEndpointSpec
-
transform
- Parameters:
expression
- theTransformer
Expression
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionEvaluatingTransformer
-
transform
public B transform(String expression, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)- Parameters:
expression
- theTransformer
Expression
.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionEvaluatingTransformer
-
transform
Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the discovered service method at runtime.- Parameters:
service
- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionEvaluatingTransformer
-
transform
Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the service method at runtime.- Parameters:
service
- the service to use.methodName
- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingTransformer
-
transform
public B transform(Object service, String methodName, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
for theMethodInvokingTransformer
to invoke the service method at runtime.- Parameters:
service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ExpressionEvaluatingTransformer
-
transform
Populate theMessageTransformingHandler
instance for theMessageProcessor
from providedMessageProcessorSpec
..transform(Scripts.script("classpath:myScript.py").variable("foo", bar()))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingTransformer
-
transform
public B transform(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
instance for theMessageProcessor
from providedMessageProcessorSpec
. In addition accept options for the integration endpoint usingGenericEndpointSpec
..transform(Scripts.script("classpath:myScript.py").variable("foo", bar()), e -> e.autoStartup(false))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingTransformer
-
convert
Populate theMessageTransformingHandler
instance for the providedpayloadType
to convert at runtime.- Type Parameters:
P
- the payload type - 'convert to'.- Parameters:
payloadType
- theClass
for expected payload type.- Returns:
- the current
BaseIntegrationFlowDefinition
. - Since:
- 5.1
- See Also:
MethodInvokingTransformer
,LambdaMessageProcessor
-
transform
Populate theMessageTransformingHandler
instance for the providedGenericTransformer
for the specificexpectedType
to convert at runtime.- Type Parameters:
P
- the payload type - 'transform from' orMessage.class
.T
- the target type - 'transform to'.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the transformer. Conversion to this type will be attempted, if necessary.genericTransformer
- theGenericTransformer
to populate.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingTransformer
,LambdaMessageProcessor
-
convert
public <P> B convert(Class<P> payloadType, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
instance for the providedpayloadType
to convert at runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec
.- Type Parameters:
P
- the payload type - 'transform to'.- Parameters:
payloadType
- theClass
for expected payload type.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - Since:
- 5.1
- See Also:
MethodInvokingTransformer
,LambdaMessageProcessor
,GenericEndpointSpec
-
transform
public <P, T> B transform(Class<P> expectedType, GenericTransformer<P,T> genericTransformer, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
instance for the providedGenericTransformer
for the specificexpectedType
to convert at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Type Parameters:
P
- the payload type - 'transform from', orMessage.class
.T
- the target type - 'transform to'.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the transformer. Conversion to this type will be attempted, if necessary.genericTransformer
- theGenericTransformer
to populate.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingTransformer
,LambdaMessageProcessor
,GenericEndpointSpec
-
filter
Populate aMessageFilter
withMessageSelector
for the provided SpEL expression.- Parameters:
expression
- the SpEL expression.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
filter
Populate aMessageFilter
withMessageSelector
for the provided SpEL expression. In addition accept options for the integration endpoint usingFilterEndpointSpec
:.filter("payload.hot"), e -> e.autoStartup(false))
- Parameters:
expression
- the SpEL expression.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
FilterEndpointSpec
-
filter
Populate aMessageFilter
withMethodInvokingSelector
for the discovered method of the provided service.- Parameters:
service
- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingSelector
-
filter
Populate aMessageFilter
withMethodInvokingSelector
for the method of the provided service.- Parameters:
service
- the service to use.methodName
- the method to invoke- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingSelector
-
filter
public B filter(Object service, String methodName, Consumer<FilterEndpointSpec> endpointConfigurer)Populate aMessageFilter
withMethodInvokingSelector
for the method of the provided service.- Parameters:
service
- the service to use.methodName
- the method to invokeendpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingSelector
-
filter
Populate aMessageFilter
withMethodInvokingSelector
for theMessageProcessor
from the providedMessageProcessorSpec
..filter(Scripts.script(scriptResource).lang("ruby"))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
filter
public B filter(MessageProcessorSpec<?> messageProcessorSpec, Consumer<FilterEndpointSpec> endpointConfigurer)Populate aMessageFilter
withMethodInvokingSelector
for theMessageProcessor
from the providedMessageProcessorSpec
. In addition accept options for the integration endpoint usingFilterEndpointSpec
..filter(Scripts.script(scriptResource).lang("ruby"), e -> e.autoStartup(false))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
filter
Populate aMessageFilter
withMethodInvokingSelector
for the providedGenericSelector
. Typically, used with a Java 8 Lambda expression:.filter(Date.class, p -> p.after(new Date()))
- Type Parameters:
P
- the source payload type orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.genericSelector
- theGenericSelector
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
filter
public <P> B filter(Class<P> expectedType, GenericSelector<P> genericSelector, Consumer<FilterEndpointSpec> endpointConfigurer)Populate aMessageFilter
withMethodInvokingSelector
for the providedGenericSelector
. In addition, accept options for the integration endpoint usingFilterEndpointSpec
. Typically, used with a Java 8 Lambda expression:.filter(Date.class, p -> p.after(new Date()), e -> e.autoStartup(false))
- Type Parameters:
P
- the source payload type orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.genericSelector
- theGenericSelector
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
,FilterEndpointSpec
-
handle
Populate aServiceActivatingHandler
for the selected protocol specificMessageHandler
implementation fromNamespace Factory
:.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))
- Type Parameters:
H
- the targetMessageHandler
type.- Parameters:
messageHandlerSpec
- theMessageHandlerSpec
to configure protocol specificMessageHandler
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
Populate aServiceActivatingHandler
for the providedMessageHandler
implementation. Can be used as Java 8 Lambda expression:.handle(m -> logger.info(m.getPayload())
- Parameters:
messageHandler
- theMessageHandler
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime.- Parameters:
beanName
- the bean name to use.methodName
- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
public B handle(String beanName, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
beanName
- the bean name to use.methodName
- the method to invoke.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the discoveredmethod
for providedservice
at runtime.- Parameters:
service
- the service object to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
service
- the service object to use.methodName
- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
public B handle(Object service, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke themethod
for providedbean
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
service
- the service object to use.methodName
- the method to invoke.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the providedGenericHandler
at runtime. Typically, used with a Java 8 Lambda expression:.handle(Integer.class, (p, h) -> p / 2)
- Type Parameters:
P
- the payload type to expect, orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the handler. Conversion to this type will be attempted, if necessary.handler
- the handler to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
handle
public <P> B handle(Class<P> expectedType, GenericHandler<P> handler, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
for theMethodInvokingMessageProcessor
to invoke the providedGenericHandler
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
. Typically used with a Java 8 Lambda expression:.handle(Integer.class, (p, h) -> p / 2, e -> e.autoStartup(false))
- Type Parameters:
P
- the payload type to expect orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the handler. Conversion to this type will be attempted, if necessary.handler
- the handler to invoke.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
handle
Populate aServiceActivatingHandler
for theMessageProcessor
from the providedMessageProcessorSpec
..handle(Scripts.script("classpath:myScript.ruby"))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
public B handle(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
for theMessageProcessor
from the providedMessageProcessorSpec
. In addition accept options for the integration endpoint usingGenericEndpointSpec
..handle(Scripts.script("classpath:myScript.ruby"), e -> e.autoStartup(false))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
public <H extends MessageHandler> B handle(MessageHandlerSpec<?,H> messageHandlerSpec, Consumer<GenericEndpointSpec<H>> endpointConfigurer)Populate aServiceActivatingHandler
for the selected protocol specificMessageHandler
implementation fromNamespace Factory
: In addition accept options for the integration endpoint usingGenericEndpointSpec
. Typically used with a Java 8 Lambda expression:.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"), e -> e.autoStartup(false))
- Type Parameters:
H
- theMessageHandler
type.- Parameters:
messageHandlerSpec
- theMessageHandlerSpec
to configure protocol specificMessageHandler
.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
handle
public <H extends MessageHandler> B handle(H messageHandler, Consumer<GenericEndpointSpec<H>> endpointConfigurer)Populate aServiceActivatingHandler
for the providedMessageHandler
implementation. In addition accept options for the integration endpoint usingGenericEndpointSpec
. Can be used as Java 8 Lambda expression:.handle(m -> logger.info(m.getPayload()), e -> e.autoStartup(false))
- Type Parameters:
H
- theMessageHandler
type.- Parameters:
messageHandler
- theMessageHandler
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
bridge
Populate aBridgeHandler
to the current integration flow position.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
bridge(Consumer)
-
bridge
Populate aBridgeHandler
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"))
- Parameters:
endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
-
delay
Populate aDelayHandler
to the current integration flow position with default options.- Parameters:
groupId
- thegroupId
for delayed messages in theMessageGroupStore
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
delay
Populate aDelayHandler
to the current integration flow position.- Parameters:
groupId
- thegroupId
for delayed messages in theMessageGroupStore
.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
DelayerEndpointSpec
-
enrich
Populate aContentEnricher
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) .autoStartup(false) .<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))
- Parameters:
enricherConfigurer
- theConsumer
to provideContentEnricher
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
EnricherSpec
-
enrichHeaders
Populate aMessageTransformingHandler
for aHeaderEnricher
using header values from providedMapBuilder
. Can be used together withNamespace Factory
:.enrichHeaders(Mail.headers() .subjectFunction(m -> "foo") .from("foo@bar") .toFunction(m -> new String[] {"bar@baz"}))
- Parameters:
headers
- theMapBuilder
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
enrichHeaders
public B enrichHeaders(MapBuilder<?,String,Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate aMessageTransformingHandler
for aHeaderEnricher
using header values from providedMapBuilder
. In addition accept options for the integration endpoint usingGenericEndpointSpec
. Can be used together withNamespace Factory
:.enrichHeaders(Mail.headers() .subjectFunction(m -> "foo") .from("foo@bar") .toFunction(m -> new String[] {"bar@baz"}), e -> e.autoStartup(false))
- Parameters:
headers
- theMapBuilder
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
-
enrichHeaders
Accept aMap
of values to be used for theMessage
header enrichment.values
can apply anExpression
to be evaluated against a requestMessage
.- Parameters:
headers
- the Map of headers to enrich.- Returns:
- the current
IntegrationFlowDefinition
.
-
enrichHeaders
public B enrichHeaders(Map<String,Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Accept aMap
of values to be used for theMessage
header enrichment.values
can apply anExpression
to be evaluated against a requestMessage
.- Parameters:
headers
- the Map of headers to enrich.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
-
enrichHeaders
Populate aMessageTransformingHandler
for aHeaderEnricher
as the result of providedConsumer
. Typically used with a Java 8 Lambda expression:.enrichHeaders(h -> h.header(FileHeaders.FILENAME, "foo.sitest") .header("directory", new File(tmpDir, "fileWritingFlow")))
- Parameters:
headerEnricherConfigurer
- theConsumer
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
HeaderEnricherSpec
-
split
Populate theDefaultMessageSplitter
with default options to the current integration flow position.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
split
Populate theDefaultMessageSplitter
with provided options to the current integration flow position. Typically used with a Java 8 Lambda expression:.split(s -> s.applySequence(false).delimiters(","))
- Parameters:
endpointConfigurer
- theConsumer
to provide integration endpoint options and forDefaultMessageSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
Populate theExpressionEvaluatingSplitter
with provided SpEL expression.- Parameters:
expression
- the splitter SpEL expression. and forExpressionEvaluatingSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
public B split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer)Populate theExpressionEvaluatingSplitter
with provided SpEL expression.- Parameters:
expression
- the splitter SpEL expression.endpointConfigurer
- theConsumer
to provide integration endpoint options and forExpressionEvaluatingSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
- Parameters:
service
- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingSplitter
-
split
- Parameters:
service
- the service to use.methodName
- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingSplitter
-
split
public B split(Object service, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)Populate theMethodInvokingSplitter
to evaluate the providedmethod
of thebean
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- theConsumer
to provide integration endpoint options and forMethodInvokingSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
,MethodInvokingSplitter
-
split
- Parameters:
beanName
- the bean name to use.methodName
- the method to invoke at runtime.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
split
public B split(String beanName, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)Populate theMethodInvokingSplitter
to evaluate the providedmethod
of thebean
at runtime. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
beanName
- the bean name to use.methodName
- the method to invoke at runtime.endpointConfigurer
- theConsumer
to provide integration endpoint options and forMethodInvokingSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
Populate theMethodInvokingSplitter
to evaluate theMessageProcessor
at runtime from providedMessageProcessorSpec
..split(Scripts.script("classpath:myScript.ruby"))
- Parameters:
messageProcessorSpec
- the splitterMessageProcessorSpec
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
public B split(MessageProcessorSpec<?> messageProcessorSpec, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)Populate theMethodInvokingSplitter
to evaluate theMessageProcessor
at runtime from providedMessageProcessorSpec
. In addition accept options for the integration endpoint usingGenericEndpointSpec
..split(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000), , e -> e.applySequence(false))
- Parameters:
messageProcessorSpec
- the splitterMessageProcessorSpec
.endpointConfigurer
- theConsumer
to provide integration endpoint options and forMethodInvokingSplitter
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
Populate theMethodInvokingSplitter
to evaluate the providedFunction
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)))))
- Type Parameters:
P
- the payload type orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the splitter. Conversion to this type will be attempted, if necessary.splitter
- the splitterFunction
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
split
public <P> B split(Class<P> expectedType, Function<P,?> splitter, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)Populate theMethodInvokingSplitter
to evaluate the providedFunction
at runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec
. 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))
- Type Parameters:
P
- the payload type orMessage.class
.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the splitter. Conversion to this type will be attempted, if necessary.splitter
- the splitterFunction
.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
,SplitterEndpointSpec
-
split
public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)Populate the providedAbstractMessageSplitter
to the current integration flow position.- Type Parameters:
S
- theAbstractMessageSplitter
- Parameters:
splitterMessageHandlerSpec
- theMessageHandlerSpec
to populate.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)Populate the providedAbstractMessageSplitter
to the current integration flow position.- Type Parameters:
S
- theAbstractMessageSplitter
- Parameters:
splitterMessageHandlerSpec
- theMessageHandlerSpec
to populate.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
Populate the providedAbstractMessageSplitter
to the current integration flow position.- Parameters:
splitter
- theAbstractMessageSplitter
to populate.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
split
public <S extends AbstractMessageSplitter> B split(S splitter, Consumer<SplitterEndpointSpec<S>> endpointConfigurer)Populate the providedAbstractMessageSplitter
to the current integration flow position.- Type Parameters:
S
- theAbstractMessageSplitter
- Parameters:
splitter
- theAbstractMessageSplitter
to populate.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
SplitterEndpointSpec
-
headerFilter
Provide theHeaderFilter
to the currentStandardIntegrationFlow
.- Parameters:
headersToRemove
- the array of headers (or patterns) to remove fromMessageHeaders
.- Returns:
- this
BaseIntegrationFlowDefinition
.
-
headerFilter
Provide theHeaderFilter
to the currentStandardIntegrationFlow
.- Parameters:
headersToRemove
- the comma separated headers (or patterns) to remove fromMessageHeaders
.patternMatch
- theboolean
flag to indicate ifheadersToRemove
should be interpreted as patterns or direct header names.- Returns:
- this
BaseIntegrationFlowDefinition
.
-
headerFilter
public B headerFilter(HeaderFilter headerFilter, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate the providedMessageTransformingHandler
for the providedHeaderFilter
.- Parameters:
headerFilter
- theHeaderFilter
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
-
claimCheckIn
- Parameters:
messageStore
- theMessageStore
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
claimCheckIn
public B claimCheckIn(MessageStore messageStore, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
for theClaimCheckInTransformer
with providedMessageStore
. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
messageStore
- theMessageStore
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
-
claimCheckOut
Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
. TheremoveMessage
option ofClaimCheckOutTransformer
is tofalse
.- Parameters:
messageStore
- theMessageStore
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
claimCheckOut
Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
andremoveMessage
flag.- Parameters:
messageStore
- theMessageStore
to use.removeMessage
- the removeMessage boolean flag.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ClaimCheckOutTransformer.setRemoveMessage(boolean)
-
claimCheckOut
public B claimCheckOut(MessageStore messageStore, boolean removeMessage, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)Populate theMessageTransformingHandler
for theClaimCheckOutTransformer
with providedMessageStore
andremoveMessage
flag. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Parameters:
messageStore
- theMessageStore
to use.removeMessage
- the removeMessage boolean flag.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
GenericEndpointSpec
,ClaimCheckOutTransformer.setRemoveMessage(boolean)
-
resequence
Populate theResequencingMessageHandler
with default options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
resequence
Populate theResequencingMessageHandler
with provided options fromResequencerSpec
. In addition, accept options for the integration endpoint usingGenericEndpointSpec
. Typically used with a Java 8 Lambda expression:.resequence(r -> r.releasePartialSequences(true) .correlationExpression("'foo'") .phase(100))
- Parameters:
resequencer
- theConsumer
to provideResequencingMessageHandler
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ResequencerSpec
-
aggregate
Populate theAggregatingMessageHandler
with default options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
aggregate
A short-cut for theaggregate((aggregator) -> aggregator.processor(aggregatorProcessor))
.- Parameters:
aggregatorProcessor
- the POJO representing aggregation strategies.- Returns:
- the current
BaseIntegrationFlowDefinition
. - Since:
- 5.5
- See Also:
AggregatorSpec
-
aggregate
Populate theAggregatingMessageHandler
with provided options fromAggregatorSpec
. In addition, accept options for the integration endpoint usingGenericEndpointSpec
. Typically used with a Java 8 Lambda expression:.aggregate(a -> a.correlationExpression("1") .releaseStrategy(g -> g.size() == 25) .phase(100))
- Parameters:
aggregator
- theConsumer
to provideAggregatingMessageHandler
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
AggregatorSpec
-
route
Populate theMethodInvokingRouter
for provided bean and its method with default options.- Parameters:
beanName
- the bean to use.method
- the method to invoke at runtime.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
public B route(String beanName, String method, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)Populate theMethodInvokingRouter
for provided bean and its method with provided options fromRouterSpec
.- Parameters:
beanName
- the bean to use.method
- the method to invoke at runtime.routerConfigurer
- theConsumer
to provideMethodInvokingRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
Populate theMethodInvokingRouter
for the discovered method of the provided service and its method with default options.- Parameters:
service
- the bean to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingRouter
-
route
Populate theMethodInvokingRouter
for the method of the provided service and its method with default options.- Parameters:
service
- the service to use.methodName
- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingRouter
-
route
public B route(Object service, String methodName, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)Populate theMethodInvokingRouter
for the method of the provided service and its method with provided options fromRouterSpec
.- Parameters:
service
- the service to use.methodName
- the method to invoke.routerConfigurer
- theConsumer
to provideMethodInvokingRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
MethodInvokingRouter
-
route
Populate theExpressionEvaluatingRouter
for provided SpEL expression with default options.- Parameters:
expression
- the expression to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
public <T> B route(String expression, Consumer<RouterSpec<T,ExpressionEvaluatingRouter>> routerConfigurer)Populate theExpressionEvaluatingRouter
for provided SpEL expression with provided options fromRouterSpec
.- Type Parameters:
T
- the target result type.- Parameters:
expression
- the expression to use.routerConfigurer
- theConsumer
to provideExpressionEvaluatingRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
Populate theMethodInvokingRouter
for providedFunction
and payload type with default options. Typically used with a Java 8 Lambda expression:.route(Integer.class, p -> p % 2 == 0)
- Type Parameters:
S
- the source payload type orMessage.class
.T
- the target result type.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.router
- theFunction
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
route
public <P, T> B route(Class<P> expectedType, Function<P,T> router, Consumer<RouterSpec<T,MethodInvokingRouter>> routerConfigurer)Populate theMethodInvokingRouter
for providedFunction
and payload type and options fromRouterSpec
. In addition, accept options for the integration endpoint usingGenericEndpointSpec
. 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)) .applySequence(false))
- Type Parameters:
P
- the source payload type orMessage.class
.T
- the target result type.- Parameters:
expectedType
- theClass
for expected payload type. It can also beMessage.class
if you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.router
- theFunction
to use.routerConfigurer
- theConsumer
to provideMethodInvokingRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
LambdaMessageProcessor
-
route
Populate theMethodInvokingRouter
for theMessageProcessor
from the providedMessageProcessorSpec
with default options..route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
public B route(MessageProcessorSpec<?> messageProcessorSpec, Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)Populate theMethodInvokingRouter
for theMessageProcessor
from the providedMessageProcessorSpec
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)))
- Parameters:
messageProcessorSpec
- theMessageProcessorSpec
to use.routerConfigurer
- theConsumer
to provideMethodInvokingRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
protected <R extends AbstractMessageRouter, S extends AbstractRouterSpec<? super S, R>> B route(S routerSpec, Consumer<S> routerConfigurer) -
routeToRecipients
Populate theRecipientListRouter
with options from theRecipientListRouterSpec
. 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"))))
- Parameters:
routerConfigurer
- theConsumer
to provideRecipientListRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
routeByException
public B routeByException(Consumer<RouterSpec<Class<? extends Throwable>,ErrorMessageExceptionTypeRouter>> routerConfigurer)Populate theErrorMessageExceptionTypeRouter
with options from theRouterSpec
. Typically used with a Java 8 Lambda expression:.routeByException(r -> r .channelMapping(IllegalArgumentException.class, "illegalArgumentChannel") .subFlowMapping(MessageHandlingException.class, sf -> sf.handle(...)) )
- Parameters:
routerConfigurer
- theConsumer
to provideErrorMessageExceptionTypeRouter
options.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
ErrorMessageExceptionTypeRouter
-
route
Populate the providedAbstractMessageRouter
implementation to the current integration flow position.- Parameters:
router
- theAbstractMessageRouter
to populate.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
route
public <R extends AbstractMessageRouter> B route(R router, Consumer<GenericEndpointSpec<R>> endpointConfigurer)Populate the providedAbstractMessageRouter
implementation to the current integration flow position. In addition accept options for the integration endpoint usingGenericEndpointSpec
.- Type Parameters:
R
- theAbstractMessageRouter
type.- Parameters:
router
- theAbstractMessageRouter
to populate.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with default options. UsesRequestReplyExchanger
Proxy on the background.- Parameters:
requestChannel
- theMessageChannel
bean name.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with options fromGatewayEndpointSpec
. UsesRequestReplyExchanger
Proxy on the background.- Parameters:
requestChannel
- theMessageChannel
bean name.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with default options. UsesRequestReplyExchanger
Proxy on the background.- Parameters:
requestChannel
- theMessageChannel
to use.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedrequestChannel
to send a request with options fromGatewayEndpointSpec
. UsesRequestReplyExchanger
Proxy on the background.- Parameters:
requestChannel
- theMessageChannel
to use.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedsubflow
. Typically used with a Java 8 Lambda expression:.gateway(f -> f.transform("From Gateway SubFlow: "::concat))
- Parameters:
flow
- theIntegrationFlow
to to send a request message and wait for reply.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
gateway
Populate the "artificial"GatewayMessageHandler
for the providedsubflow
with options fromGatewayEndpointSpec
. Typically used with a Java 8 Lambda expression:.gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L))
- Parameters:
flow
- theIntegrationFlow
to to send a request message and wait for reply.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.The full request
Message
will be logged.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for providedLoggingHandler.Level
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.The full request
Message
will be logged.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
level
- theLoggingHandler.Level
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the provided logging category andINFO
logging level.The full request
Message
will be logged.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
category
- the logging category to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level and logging category.The full request
Message
will be logged.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category to use.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.logExpression
- the SpEL expression to evaluate logger message at runtime against the requestMessage
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
function
- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
level
- theLoggingHandler.Level
.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
LoggingHandler.Level
logging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
category
- the logging category.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
level
- theLoggingHandler.Level
.function
- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, the provided logging category andFunction
for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
category
- the logging category.function
- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
public <P> B log(LoggingHandler.Level level, String category, Function<Message<P>,Object> function)Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category andFunction
for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.function
- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
log
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.When this operator is used in the end of flow, it is treated as one-way handler without any replies to continue. The
logAndReply()
should be used for request-reply configuration.- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- the current
BaseIntegrationFlowDefinition
. - See Also:
wireTap(WireTapSpec)
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.The full request
Message
will be logged.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for providedLoggingHandler.Level
logging level andorg.springframework.integration.handler.LoggingHandler
as a default logging category.The full request
Message
will be logged.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
level
- theLoggingHandler.Level
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the provided logging category andINFO
logging level.The full request
Message
will be logged.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
category
- the logging category to use.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level and logging category.The full request
Message
will be logged.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category to use.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
public IntegrationFlow logAndReply(LoggingHandler.Level level, String category, String logExpression)Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.logExpression
- the SpEL expression to evaluate logger message at runtime against the requestMessage
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
function
- the function to evaluate logger message at runtime- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
level
- theLoggingHandler.Level
.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for theINFO
LoggingHandler.Level
logging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage
.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
category
- the logging category.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
public <P> IntegrationFlow logAndReply(LoggingHandler.Level level, Function<Message<P>,Object> function)Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, theorg.springframework.integration.handler.LoggingHandler
as a default logging category andFunction
for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
level
- theLoggingHandler.Level
.function
- the function to evaluate logger message at runtime- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, the provided logging category andFunction
for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
category
- the logging category.function
- the function to evaluate logger message at runtime- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
public <P> IntegrationFlow logAndReply(LoggingHandler.Level level, String category, Function<Message<P>,Object> function)Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category andFunction
for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Type Parameters:
P
- the expected payload type. against the requestMessage
.- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.function
- the function to evaluate logger message at runtime- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
logAndReply
public IntegrationFlow logAndReply(LoggingHandler.Level level, String category, Expression logExpression)Populate aWireTap
for thecurrentMessageChannel
with theLoggingHandler
subscriber for the providedLoggingHandler.Level
logging level, logging category and SpEL expression for the log message.A
bridge()
is added after this operator to make the flow reply-producing if thereplyChannel
header is present.This operator can be used only in the end of flow.
- Parameters:
level
- theLoggingHandler.Level
.category
- the logging category.logExpression
- theExpression
to evaluate logger message at runtime against the requestMessage
.- Returns:
- an
IntegrationFlow
instance based on this builder. - See Also:
log()
,bridge()
-
scatterGather
Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function and defaultAggregatorSpec
for gathering function.- Parameters:
scatterChannel
- theMessageChannel
for scatting requests.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
scatterGather
Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function andAggregatorSpec
for gathering function.- Parameters:
scatterChannel
- theMessageChannel
for scatting requests.gatherer
- theConsumer
forAggregatorSpec
to configure gatherer. Can benull
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
scatterGather
public B scatterGather(MessageChannel scatterChannel, Consumer<AggregatorSpec> gatherer, Consumer<ScatterGatherSpec> scatterGather)Populate aScatterGatherHandler
to the current integration flow position based on the providedMessageChannel
for scattering function andAggregatorSpec
for gathering function.- Parameters:
scatterChannel
- theMessageChannel
for scatting requests.gatherer
- theConsumer
forAggregatorSpec
to configure gatherer. Can benull
.scatterGather
- theConsumer
forScatterGatherSpec
to configureScatterGatherHandler
and its endpoint. Can benull
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
scatterGather
Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function and defaultAggregatorSpec
for gathering function.- Parameters:
scatterer
- theConsumer
forRecipientListRouterSpec
to configure scatterer.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
scatterGather
public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Consumer<AggregatorSpec> gatherer)Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function andAggregatorSpec
for gathering function.- Parameters:
scatterer
- theConsumer
forRecipientListRouterSpec
to configure scatterer. Can benull
.gatherer
- theConsumer
forAggregatorSpec
to configure gatherer. Can benull
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
scatterGather
public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Consumer<AggregatorSpec> gatherer, @Nullable Consumer<ScatterGatherSpec> scatterGather)Populate aScatterGatherHandler
to the current integration flow position based on the providedRecipientListRouterSpec
for scattering function andAggregatorSpec
for gathering function.- Parameters:
scatterer
- theConsumer
forRecipientListRouterSpec
to configure scatterer.gatherer
- theConsumer
forAggregatorSpec
to configure gatherer.scatterGather
- theConsumer
forScatterGatherSpec
to configureScatterGatherHandler
and its endpoint. Can benull
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
barrier
Populate aBarrierMessageHandler
instance for provided timeout.- Parameters:
timeout
- the timeout in milliseconds.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
barrier
Populate aBarrierMessageHandler
instance for provided timeout and options fromBarrierSpec
and endpoint options fromGenericEndpointSpec
.- Parameters:
timeout
- the timeout in milliseconds.barrierConfigurer
- theConsumer
to provideBarrierMessageHandler
options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
trigger
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
.- Parameters:
triggerActionId
- theMessageTriggerAction
bean id.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
trigger
public B trigger(String triggerActionId, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
instance to performMessageTriggerAction
and endpoint options fromGenericEndpointSpec
.- Parameters:
triggerActionId
- theMessageTriggerAction
bean id.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
trigger
Populate aServiceActivatingHandler
instance to performMessageTriggerAction
.- Parameters:
triggerAction
- theMessageTriggerAction
.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
trigger
public B trigger(MessageTriggerAction triggerAction, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)Populate aServiceActivatingHandler
instance to performMessageTriggerAction
and endpoint options fromGenericEndpointSpec
.- Parameters:
triggerAction
- theMessageTriggerAction
.endpointConfigurer
- theConsumer
to provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
intercept
Add one or moreChannelInterceptor
implementations to the currentcurrentMessageChannel
, in the given order, after any interceptors already registered.- Parameters:
interceptorArray
- one or moreChannelInterceptor
s.- Returns:
- the current
BaseIntegrationFlowDefinition
. - Throws:
IllegalArgumentException
- if one or more null arguments are provided- Since:
- 5.3
-
fluxTransform
public <I, O> B fluxTransform(Function<? super reactor.core.publisher.Flux<Message<I>>,? extends org.reactivestreams.Publisher<O>> fluxFunction)Populate aFluxMessageChannel
to start a reactive processing for upstream data, wrap it to aFlux
, apply providedFunction
viaFlux.transform(Function)
and emit the result to one moreFluxMessageChannel
, subscribed in the downstream flow.- Type Parameters:
I
- the input payload type.O
- the output type.- Parameters:
fluxFunction
- theFunction
to process data reactive manner.- Returns:
- the current
BaseIntegrationFlowDefinition
.
-
nullChannel
Add a "nullChannel" bean into this flow definition as a terminal operator.- Returns:
- The
IntegrationFlow
instance based on this definition. - Since:
- 5.1
-
to
Finish this flow with delegation to otherIntegrationFlow
instance.- Parameters:
other
- theIntegrationFlow
to compose with.- Returns:
- The
IntegrationFlow
instance based on this definition. - Since:
- 5.5.4
-
toReactivePublisher
Represent an Integration Flow as a Reactive StreamsPublisher
bean.- Type Parameters:
T
- the expectedpayload
type- Returns:
- the Reactive Streams
Publisher
-
toReactivePublisher
protected <T> org.reactivestreams.Publisher<Message<T>> toReactivePublisher(boolean autoStartOnSubscribe)Represent an Integration Flow as a Reactive StreamsPublisher
bean.- Type Parameters:
T
- the expectedpayload
type- Parameters:
autoStartOnSubscribe
- start message production and consumption in the flow, when a subscription to the publisher is initiated. If this set to true, the flow is marked to not start automatically by the application context.- Returns:
- the Reactive Streams
Publisher
- Since:
- 5.5.6
-
register
protected <S extends ConsumerEndpointSpec<? super S, ? extends MessageHandler>> B register(S endpointSpec, Consumer<S> endpointConfigurer) -
registerOutputChannelIfCan
-
isOutputChannelRequired
protected boolean isOutputChannelRequired() -
_this
-
get
-
checkReuse
-
extractProxyTarget
-