B
- the BaseIntegrationFlowDefinition
implementation type.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.IntegrationFlowBeanPostProcessor
Modifier and Type | Class and Description |
---|---|
static class |
BaseIntegrationFlowDefinition.ReplyProducerCleaner |
Modifier and Type | Field and Description |
---|---|
protected Map<Object,String> |
integrationComponents |
protected static SpelExpressionParser |
PARSER |
Modifier | Constructor and Description |
---|---|
protected |
BaseIntegrationFlowDefinition() |
Modifier and Type | Method and 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 the
AggregatingMessageHandler with default options. |
B |
aggregate(java.util.function.Consumer<AggregatorSpec> aggregator)
Populate the
AggregatingMessageHandler with provided options from AggregatorSpec . |
B |
barrier(long timeout)
Populate a
BarrierMessageHandler
instance for provided timeout. |
B |
barrier(long timeout,
java.util.function.Consumer<BarrierSpec> barrierConfigurer)
Populate a
BarrierMessageHandler
instance for provided timeout and options from BarrierSpec and endpoint
options from GenericEndpointSpec . |
B |
bridge()
Populate a
BridgeHandler to the current integration flow position. |
B |
bridge(java.util.function.Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer)
Populate a
BridgeHandler to the current integration flow position. |
B |
channel(java.util.function.Function<Channels,MessageChannelSpec<?,?>> channels)
Populate a
MessageChannel instance
at the current IntegrationFlow chain position using the Channels
factory fluent API. |
B |
channel(MessageChannel messageChannel)
Populate the provided
MessageChannel instance
at the current IntegrationFlow chain position. |
B |
channel(MessageChannelSpec<?,?> messageChannelSpec)
Populate a
MessageChannel instance
at the current IntegrationFlow chain position using the MessageChannelSpec
fluent API. |
B |
channel(String messageChannelName)
Populate a
MessageChannelReference instance
at the current IntegrationFlow chain position. |
protected void |
checkReuse(MessageProducer replyHandler) |
B |
claimCheckIn(MessageStore messageStore)
|
B |
claimCheckIn(MessageStore messageStore,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
|
B |
claimCheckOut(MessageStore messageStore)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore . |
B |
claimCheckOut(MessageStore messageStore,
boolean removeMessage)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag. |
B |
claimCheckOut(MessageStore messageStore,
boolean removeMessage,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler for the ClaimCheckOutTransformer
with provided MessageStore and removeMessage flag. |
B |
controlBus()
Populate the
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position. |
B |
controlBus(java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate the
Control Bus EI Pattern specific MessageHandler implementation
at the current IntegrationFlow chain position. |
<P> B |
convert(Class<P> payloadType)
Populate the
MessageTransformingHandler instance
for the provided payloadType to convert at runtime. |
<P> B |
convert(Class<P> payloadType,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance
for the provided payloadType to convert at runtime. |
protected B |
currentComponent(Object component) |
protected InterceptableChannel |
currentInterceptableChannel()
Return the current channel if it is an
InterceptableChannel , otherwise register a new implicit
DirectChannel in the flow and return that one. |
protected B |
currentMessageChannel(MessageChannel currentMessageChannel) |
B |
delay(String groupId)
Populate a
DelayHandler to the current integration flow position
with default options. |
B |
delay(String groupId,
java.util.function.Consumer<DelayerEndpointSpec> endpointConfigurer)
Populate a
DelayHandler to the current integration flow position. |
B |
enrich(java.util.function.Consumer<EnricherSpec> enricherConfigurer)
Populate a
ContentEnricher
to the current integration flow position
with provided options. |
B |
enrichHeaders(java.util.function.Consumer<HeaderEnricherSpec> headerEnricherConfigurer)
|
B |
enrichHeaders(Map<String,Object> headers)
|
B |
enrichHeaders(Map<String,Object> headers,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
|
B |
enrichHeaders(MapBuilder<?,String,Object> headers)
Populate a
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder . |
B |
enrichHeaders(MapBuilder<?,String,Object> headers,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate a
MessageTransformingHandler for
a HeaderEnricher
using header values from provided MapBuilder . |
protected static Object |
extractProxyTarget(Object target) |
<P> B |
filter(Class<P> payloadType,
GenericSelector<P> genericSelector)
|
<P> B |
filter(Class<P> payloadType,
GenericSelector<P> genericSelector,
java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
|
B |
filter(MessageProcessorSpec<?> messageProcessorSpec)
Populate a
MessageFilter with MethodInvokingSelector
for the MessageProcessor from
the provided MessageProcessorSpec . |
B |
filter(MessageProcessorSpec<?> messageProcessorSpec,
java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector
for the MessageProcessor from
the provided MessageProcessorSpec . |
B |
filter(Object service)
Populate a
MessageFilter with MethodInvokingSelector for the
discovered method of the provided service. |
B |
filter(Object service,
String methodName)
Populate a
MessageFilter with MethodInvokingSelector for the
method of the provided service. |
B |
filter(Object service,
String methodName,
java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MethodInvokingSelector for the
method of the provided service. |
B |
filter(String expression)
Populate a
MessageFilter with MessageSelector for the provided SpEL expression. |
B |
filter(String expression,
java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
Populate a
MessageFilter with MessageSelector for the provided SpEL expression. |
B |
fixedSubscriberChannel()
Populate an
FixedSubscriberChannel instance
at the current IntegrationFlow chain position. |
B |
fixedSubscriberChannel(String messageChannelName)
Populate an
FixedSubscriberChannel instance
at the current IntegrationFlow chain position. |
<I,O> B |
fluxTransform(java.util.function.Function<? super reactor.core.publisher.Flux<Message<I>>,? extends org.reactivestreams.Publisher<O>> fluxFunction)
Populate a
FluxMessageChannel to start a reactive processing for upstream data,
wrap it to a Flux , apply provided Function via Flux.transform(Function)
and emit the result to one more FluxMessageChannel , subscribed in the downstream flow. |
B |
gateway(IntegrationFlow flow)
Populate the "artificial"
GatewayMessageHandler for the
provided subflow . |
B |
gateway(IntegrationFlow flow,
java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the
provided subflow with options from GatewayEndpointSpec . |
B |
gateway(MessageChannel requestChannel)
Populate the "artificial"
GatewayMessageHandler
for the provided requestChannel to send a request with default options. |
B |
gateway(MessageChannel requestChannel,
java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the
provided requestChannel to send a request with options from
GatewayEndpointSpec . |
B |
gateway(String requestChannel)
Populate the "artificial"
GatewayMessageHandler for the
provided requestChannel to send a request with default options. |
B |
gateway(String requestChannel,
java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
Populate the "artificial"
GatewayMessageHandler for the
provided requestChannel to send a request with options from
GatewayEndpointSpec . |
protected StandardIntegrationFlow |
get() |
protected Object |
getCurrentComponent() |
protected MessageChannel |
getCurrentMessageChannel() |
protected Map<Object,String> |
getIntegrationComponents() |
<P> B |
handle(Class<P> payloadType,
GenericHandler<P> handler)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<P> B |
handle(Class<P> payloadType,
GenericHandler<P> handler,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler at runtime. |
<H extends MessageHandler> |
handle(H messageHandler,
java.util.function.Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the provided
MessageHandler implementation. |
B |
handle(MessageHandler messageHandler)
Populate a
ServiceActivatingHandler for the provided
MessageHandler implementation. |
<H extends MessageHandler> |
handle(MessageHandlerSpec<?,H> messageHandlerSpec)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory :
|
<H extends MessageHandler> |
handle(MessageHandlerSpec<?,H> messageHandlerSpec,
java.util.function.Consumer<GenericEndpointSpec<H>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the selected protocol specific
MessageHandler implementation from Namespace Factory :
In addition accept options for the integration endpoint using GenericEndpointSpec . |
B |
handle(MessageProcessorSpec<?> messageProcessorSpec)
Populate a
ServiceActivatingHandler for the
MessageProcessor from the provided
MessageProcessorSpec . |
B |
handle(MessageProcessorSpec<?> messageProcessorSpec,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MessageProcessor from the provided
MessageProcessorSpec . |
B |
handle(Object service)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the discovered method for provided service at runtime. |
B |
handle(Object service,
String methodName)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
handle(Object service,
String methodName,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
handle(String beanName,
String methodName)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
handle(String beanName,
String methodName,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler for the
MethodInvokingMessageProcessor
to invoke the method for provided bean at runtime. |
B |
headerFilter(HeaderFilter headerFilter,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the provided
MessageTransformingHandler for the provided
HeaderFilter . |
B |
headerFilter(String... headersToRemove)
Provide the
HeaderFilter to the current StandardIntegrationFlow . |
B |
headerFilter(String headersToRemove,
boolean patternMatch)
Provide the
HeaderFilter to the current StandardIntegrationFlow . |
B |
intercept(ChannelInterceptor... interceptorArray)
Add one or more
ChannelInterceptor implementations
to the current currentMessageChannel , in the given order, after any interceptors already registered. |
protected boolean |
isImplicitChannel() |
protected boolean |
isOutputChannelRequired() |
B |
log()
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO
logging level and org.springframework.integration.handler.LoggingHandler
as a default logging category. |
B |
log(Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> B |
log(java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function for the log message. |
B |
log(LoggingHandler.Level level)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for provided LoggingHandler.Level
logging level and org.springframework.integration.handler.LoggingHandler
as a default logging category. |
B |
log(LoggingHandler.Level level,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> B |
log(LoggingHandler.Level level,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function for the log message. |
B |
log(LoggingHandler.Level level,
String category)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level and logging category. |
B |
log(LoggingHandler.Level level,
String category,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and SpEL expression for the log message. |
<P> B |
log(LoggingHandler.Level level,
String category,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and Function for the log message. |
B |
log(LoggingHandler.Level level,
String category,
String logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and SpEL expression for the log message. |
B |
log(String category)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided logging category
and INFO logging level. |
B |
log(String category,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO
LoggingHandler.Level logging level,
the provided logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> B |
log(String category,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the provided logging category and Function for the log message. |
IntegrationFlow |
logAndReply()
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO
logging level and org.springframework.integration.handler.LoggingHandler
as a default logging category. |
IntegrationFlow |
logAndReply(Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> IntegrationFlow |
logAndReply(java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function for the log message. |
IntegrationFlow |
logAndReply(LoggingHandler.Level level)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for provided LoggingHandler.Level
logging level and org.springframework.integration.handler.LoggingHandler
as a default logging category. |
IntegrationFlow |
logAndReply(LoggingHandler.Level level,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> IntegrationFlow |
logAndReply(LoggingHandler.Level level,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function for the log message. |
IntegrationFlow |
logAndReply(LoggingHandler.Level level,
String category)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level and logging category. |
IntegrationFlow |
logAndReply(LoggingHandler.Level level,
String category,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and SpEL expression for the log message. |
<P> IntegrationFlow |
logAndReply(LoggingHandler.Level level,
String category,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and Function for the log message. |
IntegrationFlow |
logAndReply(LoggingHandler.Level level,
String category,
String logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level, logging category
and SpEL expression for the log message. |
IntegrationFlow |
logAndReply(String category)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided logging category
and INFO logging level. |
IntegrationFlow |
logAndReply(String category,
Expression logExpression)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the INFO
LoggingHandler.Level logging level,
the provided logging category and SpEL expression to evaluate
logger message at runtime against the request Message . |
<P> IntegrationFlow |
logAndReply(String category,
java.util.function.Function<Message<P>,Object> function)
Populate a
WireTap for the currentMessageChannel
with the LoggingHandler subscriber for the provided
LoggingHandler.Level logging level,
the provided logging category and Function for the log message. |
IntegrationFlow |
nullChannel()
Add a bean into this flow
definition as a terminal operator.
|
protected MessageChannel |
obtainInputChannelFromFlow(IntegrationFlow flow) |
B |
publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel,
java.util.function.Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer)
The
BroadcastCapableChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. |
B |
publishSubscribeChannel(java.util.function.Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
The
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. |
B |
publishSubscribeChannel(Executor executor,
java.util.function.Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
The
PublishSubscribeChannel channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability. |
protected <S extends ConsumerEndpointSpec<? super S,? extends MessageHandler>> |
register(S endpointSpec,
java.util.function.Consumer<S> endpointConfigurer) |
protected B |
registerOutputChannelIfCan(MessageChannel outputChannel) |
B |
resequence()
Populate the
ResequencingMessageHandler with
default options. |
B |
resequence(java.util.function.Consumer<ResequencerSpec> resequencer)
Populate the
ResequencingMessageHandler with
provided options from ResequencerSpec . |
B |
route(AbstractMessageRouter router)
Populate the provided
AbstractMessageRouter implementation to the
current integration flow position. |
<P,T> B |
route(Class<P> payloadType,
java.util.function.Function<P,T> router,
java.util.function.Consumer<RouterSpec<T,MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for provided Function
and payload type and options from RouterSpec . |
<S,T> B |
route(Class<S> payloadType,
java.util.function.Function<S,T> router)
Populate the
MethodInvokingRouter for provided Function
and payload type with default options. |
B |
route(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MethodInvokingRouter for the
MessageProcessor
from the provided MessageProcessorSpec with default options. |
B |
route(MessageProcessorSpec<?> messageProcessorSpec,
java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for the
MessageProcessor
from the provided MessageProcessorSpec with default options. |
B |
route(Object service)
Populate the
MethodInvokingRouter for the discovered method
of the provided service and its method with default options. |
B |
route(Object service,
String methodName)
Populate the
MethodInvokingRouter for the method
of the provided service and its method with default options. |
B |
route(Object service,
String methodName,
java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for the method
of the provided service and its method with provided options from RouterSpec . |
<R extends AbstractMessageRouter> |
route(R router,
java.util.function.Consumer<GenericEndpointSpec<R>> endpointConfigurer)
Populate the provided
AbstractMessageRouter implementation to the
current integration flow position. |
protected <R extends AbstractMessageRouter,S extends AbstractRouterSpec<? super S,R>> |
route(S routerSpec,
java.util.function.Consumer<S> routerConfigurer) |
B |
route(String expression)
Populate the
ExpressionEvaluatingRouter for provided SpEL expression
with default options. |
<T> B |
route(String expression,
java.util.function.Consumer<RouterSpec<T,ExpressionEvaluatingRouter>> routerConfigurer)
Populate the
ExpressionEvaluatingRouter for provided SpEL expression
with provided options from RouterSpec . |
B |
route(String beanName,
String method)
Populate the
MethodInvokingRouter for provided bean and its method
with default options. |
B |
route(String beanName,
String method,
java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
Populate the
MethodInvokingRouter for provided bean and its method
with provided options from RouterSpec . |
B |
routeByException(java.util.function.Consumer<RouterSpec<Class<? extends Throwable>,ErrorMessageExceptionTypeRouter>> routerConfigurer)
Populate the
ErrorMessageExceptionTypeRouter with options from the RouterSpec . |
B |
routeToRecipients(java.util.function.Consumer<RecipientListRouterSpec> routerConfigurer)
Populate the
RecipientListRouter with options from the RecipientListRouterSpec . |
B |
scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided RecipientListRouterSpec for scattering function
and default AggregatorSpec for gathering function. |
B |
scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer,
java.util.function.Consumer<AggregatorSpec> gatherer)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided RecipientListRouterSpec for scattering function
and AggregatorSpec for gathering function. |
B |
scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer,
java.util.function.Consumer<AggregatorSpec> gatherer,
java.util.function.Consumer<ScatterGatherSpec> scatterGather)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided RecipientListRouterSpec for scattering function
and AggregatorSpec for gathering function. |
B |
scatterGather(MessageChannel scatterChannel)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided MessageChannel for scattering function
and default AggregatorSpec for gathering function. |
B |
scatterGather(MessageChannel scatterChannel,
java.util.function.Consumer<AggregatorSpec> gatherer)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided MessageChannel for scattering function
and AggregatorSpec for gathering function. |
B |
scatterGather(MessageChannel scatterChannel,
java.util.function.Consumer<AggregatorSpec> gatherer,
java.util.function.Consumer<ScatterGatherSpec> scatterGather)
Populate a
ScatterGatherHandler to the current integration flow position
based on the provided MessageChannel for scattering function
and AggregatorSpec for gathering function. |
protected void |
setImplicitChannel(boolean implicitChannel) |
B |
split()
Populate the
DefaultMessageSplitter with default options
to the current integration flow position. |
B |
split(AbstractMessageSplitter splitter)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
<P> B |
split(Class<P> payloadType,
java.util.function.Function<P,?> splitter)
Populate the
MethodInvokingSplitter to evaluate the provided
Function at runtime. |
<P> B |
split(Class<P> payloadType,
java.util.function.Function<P,?> splitter,
java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the provided
Function at runtime. |
B |
split(java.util.function.Consumer<SplitterEndpointSpec<DefaultMessageSplitter>> endpointConfigurer)
Populate the
DefaultMessageSplitter with provided options
to the current integration flow position. |
<S extends AbstractMessageSplitter> |
split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
<S extends AbstractMessageSplitter> |
split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec,
java.util.function.Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
B |
split(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MethodInvokingSplitter to evaluate the
MessageProcessor at runtime
from provided MessageProcessorSpec . |
B |
split(MessageProcessorSpec<?> messageProcessorSpec,
java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
Populate the
MethodInvokingSplitter to evaluate the
MessageProcessor at runtime
from provided MessageProcessorSpec . |
B |
split(Object service)
|
B |
split(Object service,
String methodName)
|
B |
split(Object service,
String methodName,
java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
|
<S extends AbstractMessageSplitter> |
split(S splitter,
java.util.function.Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
Populate the provided
AbstractMessageSplitter to the current integration
flow position. |
B |
split(String expression)
Populate the
ExpressionEvaluatingSplitter with provided
SpEL expression. |
B |
split(String expression,
java.util.function.Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer)
Populate the
ExpressionEvaluatingSplitter with provided
SpEL expression. |
B |
split(String beanName,
String methodName)
|
B |
split(String beanName,
String methodName,
java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
|
protected <T> org.reactivestreams.Publisher<Message<T>> |
toReactivePublisher()
Represent an Integration Flow as a Reactive Streams
Publisher bean. |
<P,T> B |
transform(Class<P> payloadType,
GenericTransformer<P,T> genericTransformer)
Populate the
MessageTransformingHandler instance for the provided
GenericTransformer for the specific payloadType to convert at
runtime. |
<P,T> B |
transform(Class<P> payloadType,
GenericTransformer<P,T> genericTransformer,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance for the provided GenericTransformer
for the specific payloadType to convert at runtime. |
B |
transform(MessageProcessorSpec<?> messageProcessorSpec)
Populate the
MessageTransformingHandler instance for the
MessageProcessor from provided MessageProcessorSpec . |
B |
transform(MessageProcessorSpec<?> messageProcessorSpec,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler instance for the
MessageProcessor from provided MessageProcessorSpec . |
B |
transform(Object service)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the discovered service method at runtime. |
B |
transform(Object service,
String methodName)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the service method at runtime. |
B |
transform(Object service,
String methodName,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Populate the
MessageTransformingHandler for the MethodInvokingTransformer
to invoke the service method at runtime. |
B |
transform(String expression)
|
B |
transform(String expression,
java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
|
B |
trigger(MessageTriggerAction triggerAction)
Populate a
ServiceActivatingHandler instance to perform MessageTriggerAction . |
B |
trigger(MessageTriggerAction triggerAction,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler instance to perform MessageTriggerAction
and endpoint options from GenericEndpointSpec . |
B |
trigger(String triggerActionId)
Populate a
ServiceActivatingHandler instance to perform MessageTriggerAction . |
B |
trigger(String triggerActionId,
java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Populate a
ServiceActivatingHandler instance to perform MessageTriggerAction
and endpoint options from GenericEndpointSpec . |
B |
wireTap(IntegrationFlow flow)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(IntegrationFlow flow,
java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(MessageChannel wireTapChannel)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(MessageChannel wireTapChannel,
java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(String wireTapChannel)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(String wireTapChannel,
java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
B |
wireTap(WireTapSpec wireTapSpec)
Populate the
Wire Tap EI Pattern specific
ChannelInterceptor implementation
to the current currentMessageChannel . |
protected static final SpelExpressionParser PARSER
protected B currentMessageChannel(@Nullable MessageChannel currentMessageChannel)
@Nullable protected MessageChannel getCurrentMessageChannel()
protected InterceptableChannel currentInterceptableChannel()
InterceptableChannel
, otherwise register a new implicit
DirectChannel
in the flow and return that one.protected void setImplicitChannel(boolean implicitChannel)
protected boolean isImplicitChannel()
public B fixedSubscriberChannel()
FixedSubscriberChannel
instance
at the current IntegrationFlow
chain position.
The 'bean name' will be generated during the bean registration phase.BaseIntegrationFlowDefinition
.public B fixedSubscriberChannel(String messageChannelName)
FixedSubscriberChannel
instance
at the current IntegrationFlow
chain position.
The provided messageChannelName
is used for the bean registration.messageChannelName
- the bean name to use.BaseIntegrationFlowDefinition
.public B channel(String messageChannelName)
MessageChannelReference
instance
at the current IntegrationFlow
chain position.
The provided messageChannelName
is used for the bean registration
(DirectChannel
), if there is no such a bean
in the application context. Otherwise the existing MessageChannel
bean is used
to wire integration endpoints.messageChannelName
- the bean name to use.BaseIntegrationFlowDefinition
.public B channel(MessageChannelSpec<?,?> messageChannelSpec)
MessageChannel
instance
at the current IntegrationFlow
chain position using the MessageChannelSpec
fluent API.messageChannelSpec
- the MessageChannelSpec
to use.BaseIntegrationFlowDefinition
.MessageChannels
public B channel(MessageChannel messageChannel)
MessageChannel
instance
at the current IntegrationFlow
chain position.
The messageChannel
can be an existing bean, or fresh instance, in which case
the IntegrationFlowBeanPostProcessor
will populate it as a bean with a generated name.messageChannel
- the MessageChannel
to populate.BaseIntegrationFlowDefinition
.public B channel(java.util.function.Function<Channels,MessageChannelSpec<?,?>> channels)
MessageChannel
instance
at the current IntegrationFlow
chain position using the Channels
factory fluent API.channels
- the Function
to use.BaseIntegrationFlowDefinition
.public B publishSubscribeChannel(java.util.function.Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
PublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.publishSubscribeChannelConfigurer
- the Consumer
to specify
PublishSubscribeSpec
options including 'subflow' definition.BaseIntegrationFlowDefinition
.public B publishSubscribeChannel(Executor executor, java.util.function.Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer)
PublishSubscribeChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.
Use the provided Executor
for the target subscribers.executor
- the Executor
to use.publishSubscribeChannelConfigurer
- the Consumer
to specify
PublishSubscribeSpec
options including 'subflow' definition.BaseIntegrationFlowDefinition
.public B publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel, java.util.function.Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer)
BroadcastCapableChannel
channel(java.lang.String)
method specific implementation to allow the use of the 'subflow' subscriber capability.broadcastCapableChannel
- the BroadcastCapableChannel
to subscriber sub-flows to.publishSubscribeChannelConfigurer
- the Consumer
to specify
BroadcastPublishSubscribeSpec
'subflow' definitions.BaseIntegrationFlowDefinition
.public B wireTap(IntegrationFlow flow)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.filter("World"::equals)
.wireTap(sf -> sf.<String, String>transform(String::toUpperCase))
.handle(p -> process(p))
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.flow
- the IntegrationFlow
for wire-tap subflow as an alternative to the wireTapChannel
.BaseIntegrationFlowDefinition
.public B wireTap(String wireTapChannel)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
f -> f.wireTap("tapChannel")
.handle(p -> process(p))
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
bean name to wire-tap.BaseIntegrationFlowDefinition
.public B wireTap(MessageChannel wireTapChannel)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(tapChannel())
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
to wire-tap.BaseIntegrationFlowDefinition
.public B wireTap(IntegrationFlow flow, java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(sf -> sf.<String, String>transform(String::toUpperCase), wt -> wt.selector("payload == 'foo'"))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.flow
- the IntegrationFlow
for wire-tap subflow as an alternative to the wireTapChannel
.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.BaseIntegrationFlowDefinition
.protected MessageChannel obtainInputChannelFromFlow(IntegrationFlow flow)
public B wireTap(String wireTapChannel, java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap("tapChannel", wt -> wt.selector(m -> m.getPayload().equals("foo")))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
bean name to wire-tap.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.BaseIntegrationFlowDefinition
.public B wireTap(MessageChannel wireTapChannel, java.util.function.Consumer<WireTapSpec> wireTapConfigurer)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo")))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapChannel
- the MessageChannel
to wire-tap.wireTapConfigurer
- the Consumer
to accept options for the WireTap
.BaseIntegrationFlowDefinition
.public B wireTap(WireTapSpec wireTapSpec)
Wire Tap
EI Pattern specific
ChannelInterceptor
implementation
to the current currentMessageChannel
.
It is useful when an implicit MessageChannel
is used between endpoints:
.transform("payload")
.wireTap(new WireTap(tapChannel().selector(m -> m.getPayload().equals("foo")))
.channel("foo")
This method can be used after any channel(java.lang.String)
for explicit MessageChannel
,
but with the caution do not impact existing ChannelInterceptor
s.wireTapSpec
- the WireTapSpec
to use.
When this EIP-method is used in the end of flow, it appends nullChannel
to terminate flow properly,
Otherwise Dispatcher has no subscribers
exception is thrown for implicit DirectChannel
.
BaseIntegrationFlowDefinition
.public B controlBus()
Control Bus
EI Pattern specific MessageHandler
implementation
at the current IntegrationFlow
chain position.BaseIntegrationFlowDefinition
.ExpressionCommandMessageProcessor
public B controlBus(java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
Control Bus
EI Pattern specific MessageHandler
implementation
at the current IntegrationFlow
chain position.endpointConfigurer
- the Consumer
to accept integration endpoint options.BaseIntegrationFlowDefinition
.ExpressionCommandMessageProcessor
,
GenericEndpointSpec
public B transform(String expression)
expression
- the Transformer
Expression
.BaseIntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(String expression, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
expression
- the Transformer
Expression
.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(Object service)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the discovered service method at runtime.service
- the service to use.BaseIntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(Object service, String methodName)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the service method at runtime.service
- the service to use.methodName
- the method to invoke.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
public B transform(Object service, String methodName, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for the MethodInvokingTransformer
to invoke the service method at runtime.service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.ExpressionEvaluatingTransformer
public B transform(MessageProcessorSpec<?> messageProcessorSpec)
MessageTransformingHandler
instance for the
MessageProcessor
from provided MessageProcessorSpec
.
.transform(Scripts.script("classpath:myScript.py").variable("foo", bar()))
messageProcessorSpec
- the MessageProcessorSpec
to use.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
public B transform(MessageProcessorSpec<?> messageProcessorSpec, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
instance for the
MessageProcessor
from provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.transform(Scripts.script("classpath:myScript.py").variable("foo", bar()),
e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
public <P> B convert(Class<P> payloadType)
MessageTransformingHandler
instance
for the provided payloadType
to convert at runtime.P
- the payload type - 'convert to'.payloadType
- the Class
for expected payload type.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
,
LambdaMessageProcessor
public <P,T> B transform(Class<P> payloadType, GenericTransformer<P,T> genericTransformer)
MessageTransformingHandler
instance for the provided
GenericTransformer
for the specific payloadType
to convert at
runtime.P
- the payload type - 'transform from' or Message.class
.T
- the target type - 'transform to'.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the transformer.
Conversion to this type will be attempted, if necessary.genericTransformer
- the GenericTransformer
to populate.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
,
LambdaMessageProcessor
public <P> B convert(Class<P> payloadType, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
instance
for the provided payloadType
to convert at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.P
- the payload type - 'transform to'.payloadType
- the Class
for expected payload type.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
,
LambdaMessageProcessor
,
GenericEndpointSpec
public <P,T> B transform(Class<P> payloadType, GenericTransformer<P,T> genericTransformer, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
instance for the provided GenericTransformer
for the specific payloadType
to convert at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.P
- the payload type - 'transform from', or Message.class
.T
- the target type - 'transform to'.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the transformer.
Conversion to this type will be attempted, if necessary.genericTransformer
- the GenericTransformer
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.MethodInvokingTransformer
,
LambdaMessageProcessor
,
GenericEndpointSpec
public B filter(String expression)
MessageFilter
with MessageSelector
for the provided SpEL expression.expression
- the SpEL expression.BaseIntegrationFlowDefinition
.public B filter(String expression, java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MessageSelector
for the provided SpEL expression.
In addition accept options for the integration endpoint using FilterEndpointSpec
:
.filter("payload.hot"), e -> e.autoStartup(false))
expression
- the SpEL expression.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.FilterEndpointSpec
public B filter(Object service)
MessageFilter
with MethodInvokingSelector
for the
discovered method of the provided service.service
- the service to use.BaseIntegrationFlowDefinition
.MethodInvokingSelector
public B filter(Object service, String methodName)
MessageFilter
with MethodInvokingSelector
for the
method of the provided service.service
- the service to use.methodName
- the method to invokeBaseIntegrationFlowDefinition
.MethodInvokingSelector
public B filter(Object service, String methodName, java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the
method of the provided service.service
- the service to use.methodName
- the method to invokeendpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.MethodInvokingSelector
public B filter(MessageProcessorSpec<?> messageProcessorSpec)
MessageFilter
with MethodInvokingSelector
for the MessageProcessor
from
the provided MessageProcessorSpec
.
.filter(Scripts.script(scriptResource).lang("ruby"))
messageProcessorSpec
- the MessageProcessorSpec
to use.BaseIntegrationFlowDefinition
.public B filter(MessageProcessorSpec<?> messageProcessorSpec, java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the MessageProcessor
from
the provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using FilterEndpointSpec
.
.filter(Scripts.script(scriptResource).lang("ruby"),
e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public <P> B filter(Class<P> payloadType, GenericSelector<P> genericSelector)
MessageFilter
with MethodInvokingSelector
for the provided GenericSelector
.
Typically used with a Java 8 Lambda expression:
.filter(Date.class, p -> p.after(new Date()))
P
- the source payload type or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the selector.
Conversion to this type will be attempted, if necessary.genericSelector
- the GenericSelector
to use.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public <P> B filter(Class<P> payloadType, GenericSelector<P> genericSelector, java.util.function.Consumer<FilterEndpointSpec> endpointConfigurer)
MessageFilter
with MethodInvokingSelector
for the provided GenericSelector
.
In addition accept options for the integration endpoint using FilterEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.filter(Date.class, p -> p.after(new Date()), e -> e.autoStartup(false))
P
- the source payload type or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the selector.
Conversion to this type will be attempted, if necessary.genericSelector
- the GenericSelector
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
,
FilterEndpointSpec
public <H extends MessageHandler> B handle(MessageHandlerSpec<?,H> messageHandlerSpec)
ServiceActivatingHandler
for the selected protocol specific
MessageHandler
implementation from Namespace Factory
:
.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))
H
- the target MessageHandler
type.messageHandlerSpec
- the MessageHandlerSpec
to configure protocol specific
MessageHandler
.BaseIntegrationFlowDefinition
.public B handle(MessageHandler messageHandler)
ServiceActivatingHandler
for the provided
MessageHandler
implementation.
Can be used as Java 8 Lambda expression:
.handle(m -> logger.info(m.getPayload())
messageHandler
- the MessageHandler
to use.BaseIntegrationFlowDefinition
.public B handle(String beanName, String methodName)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the method
for provided bean
at runtime.beanName
- the bean name to use.methodName
- the method to invoke.BaseIntegrationFlowDefinition
.public B handle(String beanName, String methodName, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the method
for provided bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.beanName
- the bean name to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B handle(Object service)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the discovered method
for provided service
at runtime.service
- the service object to use.BaseIntegrationFlowDefinition
.public B handle(Object service, String methodName)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the method
for provided bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.service
- the service object to use.methodName
- the method to invoke.BaseIntegrationFlowDefinition
.public B handle(Object service, String methodName, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the method
for provided bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.service
- the service object to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public <P> B handle(Class<P> payloadType, GenericHandler<P> handler)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler
at runtime.
Typically used with a Java 8 Lambda expression:
.handle(Integer.class, (p, h) -> p / 2)
P
- the payload type to expect, or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.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.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public <P> B handle(Class<P> payloadType, GenericHandler<P> handler, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
for the
MethodInvokingMessageProcessor
to invoke the provided GenericHandler
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.handle(Integer.class, (p, h) -> p / 2, e -> e.autoStartup(false))
P
- the payload type to expect or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.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
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public B handle(MessageProcessorSpec<?> messageProcessorSpec)
ServiceActivatingHandler
for the
MessageProcessor
from the provided
MessageProcessorSpec
.
.handle(Scripts.script("classpath:myScript.ruby"))
messageProcessorSpec
- the MessageProcessorSpec
to use.BaseIntegrationFlowDefinition
.public B handle(MessageProcessorSpec<?> messageProcessorSpec, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
for the
MessageProcessor
from the provided
MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.handle(Scripts.script("classpath:myScript.ruby"), e -> e.autoStartup(false))
messageProcessorSpec
- the MessageProcessorSpec
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public <H extends MessageHandler> B handle(MessageHandlerSpec<?,H> messageHandlerSpec, java.util.function.Consumer<GenericEndpointSpec<H>> endpointConfigurer)
ServiceActivatingHandler
for the selected protocol specific
MessageHandler
implementation from Namespace Factory
:
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"),
e -> e.autoStartup(false))
H
- the MessageHandler
type.messageHandlerSpec
- the MessageHandlerSpec
to configure protocol specific
MessageHandler
.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public <H extends MessageHandler> B handle(H messageHandler, java.util.function.Consumer<GenericEndpointSpec<H>> endpointConfigurer)
ServiceActivatingHandler
for the provided
MessageHandler
implementation.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Can be used as Java 8 Lambda expression:
.handle(m -> logger.info(m.getPayload()), e -> e.autoStartup(false))
H
- the MessageHandler
type.messageHandler
- the MessageHandler
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B bridge()
BridgeHandler
to the current integration flow position.BaseIntegrationFlowDefinition
.bridge(Consumer)
public B bridge(java.util.function.Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer)
BridgeHandler
to the current integration flow position.
Typically used with a Java 8 Lambda expression:
.bridge(s -> s.poller(Pollers.fixedDelay(100))
.autoStartup(false)
.id("priorityChannelBridge"))
endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
public B delay(String groupId)
DelayHandler
to the current integration flow position
with default options.groupId
- the groupId
for delayed messages in the
MessageGroupStore
.BaseIntegrationFlowDefinition
.public B delay(String groupId, java.util.function.Consumer<DelayerEndpointSpec> endpointConfigurer)
DelayHandler
to the current integration flow position.groupId
- the groupId
for delayed messages in the
MessageGroupStore
.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.DelayerEndpointSpec
public B enrich(java.util.function.Consumer<EnricherSpec> enricherConfigurer)
ContentEnricher
to the current integration flow position
with provided options.
Typically used with a Java 8 Lambda expression:
.enrich(e -> e.requestChannel("enrichChannel")
.requestPayload(Message::getPayload)
.shouldClonePayload(false)
.autoStartup(false)
.<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))
enricherConfigurer
- the Consumer
to provide
ContentEnricher
options.BaseIntegrationFlowDefinition
.EnricherSpec
public B enrichHeaders(MapBuilder<?,String,Object> headers)
MessageTransformingHandler
for
a HeaderEnricher
using header values from provided MapBuilder
.
Can be used together with Namespace Factory
:
.enrichHeaders(Mail.headers()
.subjectFunction(m -> "foo")
.from("foo@bar")
.toFunction(m -> new String[] {"bar@baz"}))
headers
- the MapBuilder
to use.BaseIntegrationFlowDefinition
.public B enrichHeaders(MapBuilder<?,String,Object> headers, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for
a HeaderEnricher
using header values from provided MapBuilder
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Can be used together with Namespace Factory
:
.enrichHeaders(Mail.headers()
.subjectFunction(m -> "foo")
.from("foo@bar")
.toFunction(m -> new String[] {"bar@baz"}),
e -> e.autoStartup(false))
headers
- the MapBuilder
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
public B enrichHeaders(Map<String,Object> headers)
Map
of values to be used for the
Message
header enrichment.
values
can apply an Expression
to be evaluated against a request Message
.headers
- the Map of headers to enrich.IntegrationFlowDefinition
.public B enrichHeaders(Map<String,Object> headers, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
Map
of values to be used for the
Message
header enrichment.
values
can apply an Expression
to be evaluated against a request Message
.headers
- the Map of headers to enrich.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
public B enrichHeaders(java.util.function.Consumer<HeaderEnricherSpec> headerEnricherConfigurer)
MessageTransformingHandler
for
a HeaderEnricher
as the result of provided Consumer
.
Typically used with a Java 8 Lambda expression:
.enrichHeaders(h -> h.header(FileHeaders.FILENAME, "foo.sitest")
.header("directory", new File(tmpDir, "fileWritingFlow")))
headerEnricherConfigurer
- the Consumer
to use.BaseIntegrationFlowDefinition
.HeaderEnricherSpec
public B split()
DefaultMessageSplitter
with default options
to the current integration flow position.BaseIntegrationFlowDefinition
.public B split(java.util.function.Consumer<SplitterEndpointSpec<DefaultMessageSplitter>> endpointConfigurer)
DefaultMessageSplitter
with provided options
to the current integration flow position.
Typically used with a Java 8 Lambda expression:
.split(s -> s.applySequence(false).delimiters(","))
endpointConfigurer
- the Consumer
to provide integration endpoint options
and for DefaultMessageSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(String expression)
ExpressionEvaluatingSplitter
with provided
SpEL expression.expression
- the splitter SpEL expression.
and for ExpressionEvaluatingSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(String expression, java.util.function.Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer)
ExpressionEvaluatingSplitter
with provided
SpEL expression.expression
- the splitter SpEL expression.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for ExpressionEvaluatingSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(Object service)
service
- the service to use.BaseIntegrationFlowDefinition
.MethodInvokingSplitter
public B split(Object service, String methodName)
service
- the service to use.methodName
- the method to invoke.BaseIntegrationFlowDefinition
.MethodInvokingSplitter
public B split(Object service, String methodName, java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter
to evaluate the provided
method
of the bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.service
- the service to use.methodName
- the method to invoke.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for MethodInvokingSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
,
MethodInvokingSplitter
public B split(String beanName, String methodName)
beanName
- the bean name to use.methodName
- the method to invoke at runtime.BaseIntegrationFlowDefinition
.public B split(String beanName, String methodName, java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter
to evaluate the provided
method
of the bean
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.beanName
- the bean name to use.methodName
- the method to invoke at runtime.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for MethodInvokingSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(MessageProcessorSpec<?> messageProcessorSpec)
MethodInvokingSplitter
to evaluate the
MessageProcessor
at runtime
from provided MessageProcessorSpec
.
.split(Scripts.script("classpath:myScript.ruby"))
messageProcessorSpec
- the splitter MessageProcessorSpec
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(MessageProcessorSpec<?> messageProcessorSpec, java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter
to evaluate the
MessageProcessor
at runtime
from provided MessageProcessorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
.split(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000),
, e -> e.applySequence(false))
messageProcessorSpec
- the splitter MessageProcessorSpec
.endpointConfigurer
- the Consumer
to provide integration endpoint options
and for MethodInvokingSplitter
.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public <P> B split(Class<P> payloadType, java.util.function.Function<P,?> splitter)
MethodInvokingSplitter
to evaluate the provided
Function
at runtime.
Typically used with a Java 8 Lambda expression:
.split(String.class, p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2)))))
P
- the payload type or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the splitter.
Conversion to this type will be attempted, if necessary.splitter
- the splitter Function
.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public <P> B split(Class<P> payloadType, java.util.function.Function<P,?> splitter, java.util.function.Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer)
MethodInvokingSplitter
to evaluate the provided
Function
at runtime.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.split(String.class, p ->
jdbcTemplate.execute("SELECT * from FOO",
(PreparedStatement ps) ->
new ResultSetIterator<Foo>(ps.executeQuery(),
(rs, rowNum) ->
new Foo(rs.getInt(1), rs.getString(2))))
, e -> e.applySequence(false))
P
- the payload type or Message.class
.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the splitter.
Conversion to this type will be attempted, if necessary.splitter
- the splitter Function
.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
,
SplitterEndpointSpec
public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitterMessageHandlerSpec
- the MessageHandlerSpec
to populate.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?,S> splitterMessageHandlerSpec, java.util.function.Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitterMessageHandlerSpec
- the MessageHandlerSpec
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B split(AbstractMessageSplitter splitter)
AbstractMessageSplitter
to the current integration
flow position.splitter
- the AbstractMessageSplitter
to populate.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public <S extends AbstractMessageSplitter> B split(S splitter, java.util.function.Consumer<SplitterEndpointSpec<S>> endpointConfigurer)
AbstractMessageSplitter
to the current integration
flow position.S
- the AbstractMessageSplitter
splitter
- the AbstractMessageSplitter
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.SplitterEndpointSpec
public B headerFilter(String... headersToRemove)
HeaderFilter
to the current StandardIntegrationFlow
.headersToRemove
- the array of headers (or patterns)
to remove from MessageHeaders
.BaseIntegrationFlowDefinition
.public B headerFilter(String headersToRemove, boolean patternMatch)
HeaderFilter
to the current StandardIntegrationFlow
.headersToRemove
- the comma separated headers (or patterns) to remove from
MessageHeaders
.patternMatch
- the boolean
flag to indicate if headersToRemove
should be interpreted as patterns or direct header names.BaseIntegrationFlowDefinition
.public B headerFilter(HeaderFilter headerFilter, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for the provided
HeaderFilter
.headerFilter
- the HeaderFilter
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
public B claimCheckIn(MessageStore messageStore)
messageStore
- the MessageStore
to use.BaseIntegrationFlowDefinition
.public B claimCheckIn(MessageStore messageStore, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for the ClaimCheckInTransformer
with provided MessageStore
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.messageStore
- the MessageStore
to use.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
public B claimCheckOut(MessageStore messageStore)
MessageTransformingHandler
for the ClaimCheckOutTransformer
with provided MessageStore
.
The removeMessage
option of ClaimCheckOutTransformer
is to false
.messageStore
- the MessageStore
to use.BaseIntegrationFlowDefinition
.public B claimCheckOut(MessageStore messageStore, boolean removeMessage)
MessageTransformingHandler
for the ClaimCheckOutTransformer
with provided MessageStore
and removeMessage
flag.messageStore
- the MessageStore
to use.removeMessage
- the removeMessage boolean flag.BaseIntegrationFlowDefinition
.ClaimCheckOutTransformer.setRemoveMessage(boolean)
public B claimCheckOut(MessageStore messageStore, boolean removeMessage, java.util.function.Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer)
MessageTransformingHandler
for the ClaimCheckOutTransformer
with provided MessageStore
and removeMessage
flag.
In addition accept options for the integration endpoint using GenericEndpointSpec
.messageStore
- the MessageStore
to use.removeMessage
- the removeMessage boolean flag.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.GenericEndpointSpec
,
ClaimCheckOutTransformer.setRemoveMessage(boolean)
public B resequence()
ResequencingMessageHandler
with
default options.BaseIntegrationFlowDefinition
.public B resequence(java.util.function.Consumer<ResequencerSpec> resequencer)
ResequencingMessageHandler
with
provided options from ResequencerSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.resequence(r -> r.releasePartialSequences(true)
.correlationExpression("'foo'")
.phase(100))
resequencer
- the Consumer
to provide
ResequencingMessageHandler
options.BaseIntegrationFlowDefinition
.ResequencerSpec
public B aggregate()
AggregatingMessageHandler
with default options.BaseIntegrationFlowDefinition
.public B aggregate(java.util.function.Consumer<AggregatorSpec> aggregator)
AggregatingMessageHandler
with provided options from AggregatorSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.aggregate(a -> a.correlationExpression("1")
.releaseStrategy(g -> g.size() == 25)
.phase(100))
aggregator
- the Consumer
to provide AggregatingMessageHandler
options.BaseIntegrationFlowDefinition
.AggregatorSpec
public B route(String beanName, String method)
MethodInvokingRouter
for provided bean and its method
with default options.beanName
- the bean to use.method
- the method to invoke at runtime.BaseIntegrationFlowDefinition
.public B route(String beanName, String method, java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for provided bean and its method
with provided options from RouterSpec
.beanName
- the bean to use.method
- the method to invoke at runtime.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.BaseIntegrationFlowDefinition
.public B route(Object service)
MethodInvokingRouter
for the discovered method
of the provided service and its method with default options.service
- the bean to use.BaseIntegrationFlowDefinition
.MethodInvokingRouter
public B route(Object service, String methodName)
MethodInvokingRouter
for the method
of the provided service and its method with default options.service
- the service to use.methodName
- the method to invoke.BaseIntegrationFlowDefinition
.MethodInvokingRouter
public B route(Object service, String methodName, java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for the method
of the provided service and its method with provided options from RouterSpec
.service
- the service to use.methodName
- the method to invoke.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.BaseIntegrationFlowDefinition
.MethodInvokingRouter
public B route(String expression)
ExpressionEvaluatingRouter
for provided SpEL expression
with default options.expression
- the expression to use.BaseIntegrationFlowDefinition
.public <T> B route(String expression, java.util.function.Consumer<RouterSpec<T,ExpressionEvaluatingRouter>> routerConfigurer)
ExpressionEvaluatingRouter
for provided SpEL expression
with provided options from RouterSpec
.T
- the target result type.expression
- the expression to use.routerConfigurer
- the Consumer
to provide ExpressionEvaluatingRouter
options.BaseIntegrationFlowDefinition
.public <S,T> B route(Class<S> payloadType, java.util.function.Function<S,T> router)
MethodInvokingRouter
for provided Function
and payload type with default options.
Typically used with a Java 8 Lambda expression:
.route(Integer.class, p -> p % 2 == 0)
S
- the source payload type or Message.class
.T
- the target result type.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the splitter.
Conversion to this type will be attempted, if necessary.router
- the Function
to use.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public <P,T> B route(Class<P> payloadType, java.util.function.Function<P,T> router, java.util.function.Consumer<RouterSpec<T,MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for provided Function
and payload type and options from RouterSpec
.
In addition accept options for the integration endpoint using GenericEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.route(Integer.class, p -> p % 2 == 0,
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3))
.applySequence(false))
P
- the source payload type or Message.class
.T
- the target result type.payloadType
- the Class
for expected payload type. It can also be
Message.class
if you wish to access the entire message in the splitter.
Conversion to this type will be attempted, if necessary.router
- the Function
to use.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.BaseIntegrationFlowDefinition
.LambdaMessageProcessor
public B route(MessageProcessorSpec<?> messageProcessorSpec)
MethodInvokingRouter
for the
MessageProcessor
from the provided MessageProcessorSpec
with default options.
.route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000))
messageProcessorSpec
- the MessageProcessorSpec
to use.BaseIntegrationFlowDefinition
.public B route(MessageProcessorSpec<?> messageProcessorSpec, java.util.function.Consumer<RouterSpec<Object,MethodInvokingRouter>> routerConfigurer)
MethodInvokingRouter
for the
MessageProcessor
from the provided MessageProcessorSpec
with default options.
.route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000),
m -> m.channelMapping("true", "evenChannel")
.subFlowMapping("false", f ->
f.<Integer>handle((p, h) -> p * 3)))
messageProcessorSpec
- the MessageProcessorSpec
to use.routerConfigurer
- the Consumer
to provide MethodInvokingRouter
options.BaseIntegrationFlowDefinition
.protected <R extends AbstractMessageRouter,S extends AbstractRouterSpec<? super S,R>> B route(S routerSpec, java.util.function.Consumer<S> routerConfigurer)
public B routeToRecipients(java.util.function.Consumer<RecipientListRouterSpec> routerConfigurer)
RecipientListRouter
with options from the RecipientListRouterSpec
.
Typically used with a Java 8 Lambda expression:
.routeToRecipients(r -> r
.recipient("bar-channel", m ->
m.getHeaders().containsKey("recipient") && (boolean) m.getHeaders().get("recipient"))
.recipientFlow("'foo' == payload or 'bar' == payload or 'baz' == payload",
f -> f.transform(String.class, p -> p.toUpperCase())
.channel(c -> c.queue("recipientListSubFlow1Result"))))
routerConfigurer
- the Consumer
to provide RecipientListRouter
options.BaseIntegrationFlowDefinition
.public B routeByException(java.util.function.Consumer<RouterSpec<Class<? extends Throwable>,ErrorMessageExceptionTypeRouter>> routerConfigurer)
ErrorMessageExceptionTypeRouter
with options from the RouterSpec
.
Typically used with a Java 8 Lambda expression:
.routeByException(r -> r
.channelMapping(IllegalArgumentException.class, "illegalArgumentChannel")
.subFlowMapping(MessageHandlingException.class, sf ->
sf.handle(...))
)
routerConfigurer
- the Consumer
to provide ErrorMessageExceptionTypeRouter
options.BaseIntegrationFlowDefinition
.ErrorMessageExceptionTypeRouter
public B route(AbstractMessageRouter router)
AbstractMessageRouter
implementation to the
current integration flow position.router
- the AbstractMessageRouter
to populate.BaseIntegrationFlowDefinition
.public <R extends AbstractMessageRouter> B route(R router, java.util.function.Consumer<GenericEndpointSpec<R>> endpointConfigurer)
AbstractMessageRouter
implementation to the
current integration flow position.
In addition accept options for the integration endpoint using GenericEndpointSpec
.R
- the AbstractMessageRouter
type.router
- the AbstractMessageRouter
to populate.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B gateway(String requestChannel)
GatewayMessageHandler
for the
provided requestChannel
to send a request with default options.
Uses RequestReplyExchanger
Proxy
on the background.requestChannel
- the MessageChannel
bean name.BaseIntegrationFlowDefinition
.public B gateway(String requestChannel, java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler
for the
provided requestChannel
to send a request with options from
GatewayEndpointSpec
. Uses
RequestReplyExchanger
Proxy on the
background.requestChannel
- the MessageChannel
bean name.endpointConfigurer
- the Consumer
to provide integration endpoint
options.BaseIntegrationFlowDefinition
.public B gateway(MessageChannel requestChannel)
GatewayMessageHandler
for the provided requestChannel
to send a request with default options.
Uses RequestReplyExchanger
Proxy on
the background.requestChannel
- the MessageChannel
to use.BaseIntegrationFlowDefinition
.public B gateway(MessageChannel requestChannel, java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler
for the
provided requestChannel
to send a request with options from
GatewayEndpointSpec
. Uses
RequestReplyExchanger
Proxy on the
background.requestChannel
- the MessageChannel
to use.endpointConfigurer
- the Consumer
to provide integration endpoint
options.BaseIntegrationFlowDefinition
.public B gateway(IntegrationFlow flow)
GatewayMessageHandler
for the
provided subflow
.
Typically used with a Java 8 Lambda expression:
.gateway(f -> f.transform("From Gateway SubFlow: "::concat))
flow
- the IntegrationFlow
to to send a request message and wait for reply.BaseIntegrationFlowDefinition
.public B gateway(IntegrationFlow flow, java.util.function.Consumer<GatewayEndpointSpec> endpointConfigurer)
GatewayMessageHandler
for the
provided subflow
with options from GatewayEndpointSpec
.
Typically used with a Java 8 Lambda expression:
.gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L))
flow
- the IntegrationFlow
to to send a request message and wait for reply.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B log()
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level and org.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.
BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(LoggingHandler.Level level)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for provided LoggingHandler.Level
logging level and org.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.
level
- the LoggingHandler.Level
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(String category)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided logging category
and INFO
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.
category
- the logging category to use.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(LoggingHandler.Level level, String category)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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.
level
- the LoggingHandler.Level
.category
- the logging category to use.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(LoggingHandler.Level level, String category, String logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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.
level
- the LoggingHandler.Level
.category
- the logging category.logExpression
- the SpEL expression to evaluate logger message at runtime
against the request Message
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public <P> B log(java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function
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.
P
- the expected payload type.
against the request Message
.function
- the function to evaluate logger message at runtimeBaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request 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.
logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(LoggingHandler.Level level, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request 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.
level
- the LoggingHandler.Level
.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(String category, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
LoggingHandler.Level
logging level,
the provided logging category and SpEL expression to evaluate
logger message at runtime against the request 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.
category
- the logging category.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public <P> B log(LoggingHandler.Level level, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function
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.
P
- the expected payload type.
against the request Message
.level
- the LoggingHandler.Level
.function
- the function to evaluate logger message at runtimeBaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public <P> B log(String category, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the provided logging category and Function
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.
P
- the expected payload type.
against the request Message
.category
- the logging category.function
- the function to evaluate logger message at runtimeBaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public <P> B log(LoggingHandler.Level level, String category, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level, logging category
and Function
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.
P
- the expected payload type.
against the request Message
.level
- the LoggingHandler.Level
.category
- the logging category.function
- the function to evaluate logger message at runtimeBaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public B log(LoggingHandler.Level level, String category, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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.
level
- the LoggingHandler.Level
.category
- the logging category.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.BaseIntegrationFlowDefinition
.wireTap(WireTapSpec)
public IntegrationFlow logAndReply()
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level and org.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 the replyChannel
header is present.
This operator can be used only in the end of flow.
IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(LoggingHandler.Level level)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for provided LoggingHandler.Level
logging level and org.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 the replyChannel
header is present.
This operator can be used only in the end of flow.
level
- the LoggingHandler.Level
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(String category)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided logging category
and INFO
logging level.
The full request Message
will be logged.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
category
- the logging category to use.IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(LoggingHandler.Level level, String category)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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 the replyChannel
header is present.
This operator can be used only in the end of flow.
level
- the LoggingHandler.Level
.category
- the logging category to use.IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(LoggingHandler.Level level, String category, String logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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 the replyChannel
header is present.
This operator can be used only in the end of flow.
level
- the LoggingHandler.Level
.category
- the logging category.logExpression
- the SpEL expression to evaluate logger message at runtime
against the request Message
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public <P> IntegrationFlow logAndReply(java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function
for the log message.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
P
- the expected payload type.
against the request Message
.function
- the function to evaluate logger message at runtimeIntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message
.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(LoggingHandler.Level level, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and SpEL expression to evaluate
logger message at runtime against the request Message
.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
level
- the LoggingHandler.Level
.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(String category, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the INFO
LoggingHandler.Level
logging level,
the provided logging category and SpEL expression to evaluate
logger message at runtime against the request Message
.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
category
- the logging category.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public <P> IntegrationFlow logAndReply(LoggingHandler.Level level, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the org.springframework.integration.handler.LoggingHandler
as a default logging category and Function
for the log message.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
P
- the expected payload type.
against the request Message
.level
- the LoggingHandler.Level
.function
- the function to evaluate logger message at runtimeIntegrationFlow
instance based on this builder.log()
,
bridge()
public <P> IntegrationFlow logAndReply(String category, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level,
the provided logging category and Function
for the log message.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
P
- the expected payload type.
against the request Message
.category
- the logging category.function
- the function to evaluate logger message at runtimeIntegrationFlow
instance based on this builder.log()
,
bridge()
public <P> IntegrationFlow logAndReply(LoggingHandler.Level level, String category, java.util.function.Function<Message<P>,Object> function)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.Level
logging level, logging category
and Function
for the log message.
A bridge()
is added after this operator to make the flow reply-producing
if the replyChannel
header is present.
This operator can be used only in the end of flow.
P
- the expected payload type.
against the request Message
.level
- the LoggingHandler.Level
.category
- the logging category.function
- the function to evaluate logger message at runtimeIntegrationFlow
instance based on this builder.log()
,
bridge()
public IntegrationFlow logAndReply(LoggingHandler.Level level, String category, Expression logExpression)
WireTap
for the currentMessageChannel
with the LoggingHandler
subscriber for the provided
LoggingHandler.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 the replyChannel
header is present.
This operator can be used only in the end of flow.
level
- the LoggingHandler.Level
.category
- the logging category.logExpression
- the Expression
to evaluate logger message at runtime
against the request Message
.IntegrationFlow
instance based on this builder.log()
,
bridge()
public B scatterGather(MessageChannel scatterChannel)
ScatterGatherHandler
to the current integration flow position
based on the provided MessageChannel
for scattering function
and default AggregatorSpec
for gathering function.scatterChannel
- the MessageChannel
for scatting requests.BaseIntegrationFlowDefinition
.public B scatterGather(MessageChannel scatterChannel, java.util.function.Consumer<AggregatorSpec> gatherer)
ScatterGatherHandler
to the current integration flow position
based on the provided MessageChannel
for scattering function
and AggregatorSpec
for gathering function.scatterChannel
- the MessageChannel
for scatting requests.gatherer
- the Consumer
for AggregatorSpec
to configure gatherer.
Can be null
.BaseIntegrationFlowDefinition
.public B scatterGather(MessageChannel scatterChannel, java.util.function.Consumer<AggregatorSpec> gatherer, java.util.function.Consumer<ScatterGatherSpec> scatterGather)
ScatterGatherHandler
to the current integration flow position
based on the provided MessageChannel
for scattering function
and AggregatorSpec
for gathering function.scatterChannel
- the MessageChannel
for scatting requests.gatherer
- the Consumer
for AggregatorSpec
to configure gatherer.
Can be null
.scatterGather
- the Consumer
for ScatterGatherSpec
to configure
ScatterGatherHandler
and its endpoint. Can be null
.BaseIntegrationFlowDefinition
.public B scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer)
ScatterGatherHandler
to the current integration flow position
based on the provided RecipientListRouterSpec
for scattering function
and default AggregatorSpec
for gathering function.scatterer
- the Consumer
for RecipientListRouterSpec
to configure scatterer.BaseIntegrationFlowDefinition
.public B scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer, @Nullable java.util.function.Consumer<AggregatorSpec> gatherer)
ScatterGatherHandler
to the current integration flow position
based on the provided RecipientListRouterSpec
for scattering function
and AggregatorSpec
for gathering function.scatterer
- the Consumer
for RecipientListRouterSpec
to configure scatterer.
Can be null
.gatherer
- the Consumer
for AggregatorSpec
to configure gatherer.
Can be null
.BaseIntegrationFlowDefinition
.public B scatterGather(java.util.function.Consumer<RecipientListRouterSpec> scatterer, @Nullable java.util.function.Consumer<AggregatorSpec> gatherer, @Nullable java.util.function.Consumer<ScatterGatherSpec> scatterGather)
ScatterGatherHandler
to the current integration flow position
based on the provided RecipientListRouterSpec
for scattering function
and AggregatorSpec
for gathering function.scatterer
- the Consumer
for RecipientListRouterSpec
to configure scatterer.gatherer
- the Consumer
for AggregatorSpec
to configure gatherer.scatterGather
- the Consumer
for ScatterGatherSpec
to configure
ScatterGatherHandler
and its endpoint. Can be null
.BaseIntegrationFlowDefinition
.public B barrier(long timeout)
BarrierMessageHandler
instance for provided timeout.timeout
- the timeout in milliseconds.BaseIntegrationFlowDefinition
.public B barrier(long timeout, java.util.function.Consumer<BarrierSpec> barrierConfigurer)
BarrierMessageHandler
instance for provided timeout and options from BarrierSpec
and endpoint
options from GenericEndpointSpec
.timeout
- the timeout in milliseconds.barrierConfigurer
- the Consumer
to provide
BarrierMessageHandler
options.BaseIntegrationFlowDefinition
.public B trigger(String triggerActionId)
ServiceActivatingHandler
instance to perform MessageTriggerAction
.triggerActionId
- the MessageTriggerAction
bean id.BaseIntegrationFlowDefinition
.public B trigger(String triggerActionId, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
instance to perform MessageTriggerAction
and endpoint options from GenericEndpointSpec
.triggerActionId
- the MessageTriggerAction
bean id.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B trigger(MessageTriggerAction triggerAction)
ServiceActivatingHandler
instance to perform MessageTriggerAction
.triggerAction
- the MessageTriggerAction
.BaseIntegrationFlowDefinition
.public B trigger(MessageTriggerAction triggerAction, java.util.function.Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer)
ServiceActivatingHandler
instance to perform MessageTriggerAction
and endpoint options from GenericEndpointSpec
.triggerAction
- the MessageTriggerAction
.endpointConfigurer
- the Consumer
to provide integration endpoint options.BaseIntegrationFlowDefinition
.public B intercept(ChannelInterceptor... interceptorArray)
ChannelInterceptor
implementations
to the current currentMessageChannel
, in the given order, after any interceptors already registered.interceptorArray
- one or more ChannelInterceptor
s.BaseIntegrationFlowDefinition
.IllegalArgumentException
- if one or more null arguments are providedpublic <I,O> B fluxTransform(java.util.function.Function<? super reactor.core.publisher.Flux<Message<I>>,? extends org.reactivestreams.Publisher<O>> fluxFunction)
FluxMessageChannel
to start a reactive processing for upstream data,
wrap it to a Flux
, apply provided Function
via Flux.transform(Function)
and emit the result to one more FluxMessageChannel
, subscribed in the downstream flow.I
- the input payload type.O
- the output type.fluxFunction
- the Function
to process data reactive manner.BaseIntegrationFlowDefinition
.public IntegrationFlow nullChannel()
IntegrationFlow
instance based on this definition.protected <T> org.reactivestreams.Publisher<Message<T>> toReactivePublisher()
Publisher
bean.T
- the expected payload
typePublisher
protected <S extends ConsumerEndpointSpec<? super S,? extends MessageHandler>> B register(S endpointSpec, java.util.function.Consumer<S> endpointConfigurer)
protected B registerOutputChannelIfCan(MessageChannel outputChannel)
protected boolean isOutputChannelRequired()
protected final B _this()
protected StandardIntegrationFlow get()
protected void checkReuse(MessageProducer replyHandler)