Class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlowDefinition<B>>
java.lang.Object
org.springframework.integration.dsl.BaseIntegrationFlowDefinition<B>
- Type Parameters:
B- theBaseIntegrationFlowDefinitionimplementation type.
- Direct Known Subclasses:
IntegrationFlowDefinition
@IntegrationDsl
public abstract class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlowDefinition<B>>
extends Object
The
Builder pattern implementation for the EIP-method chain.
Provides a variety of methods to populate Spring Integration components
to an IntegrationFlow for the future registration in the
application context.- Since:
- 5.2.1
- Author:
- Artem Bilan, Gary Russell, Gabriele Del Prete, Tim Feuerbach, Ngoc Nhan
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final B_this()protected BaddComponent(Object component) protected BaddComponent(Object component, String beanName) protected BaddComponents(Map<Object, String> components) Populate theAggregatingMessageHandlerwith default options.A short-cut for theaggregate((aggregator) -> aggregator.processor(aggregatorProcessor)).aggregate(Consumer<AggregatorSpec> aggregator) Populate theAggregatingMessageHandlerwith provided options fromAggregatorSpec.barrier(long timeout) Populate aBarrierMessageHandlerinstance for provided timeout.barrier(long timeout, Consumer<BarrierSpec> barrierConfigurer) Populate aBarrierMessageHandlerinstance for provided timeout and options fromBarrierSpecand endpoint options fromGenericEndpointSpec.bridge()Populate aBridgeHandlerto the current integration flow position.bridge(Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer) Populate aBridgeHandlerto the current integration flow position.Populate aMessageChannelReferenceinstance at the currentIntegrationFlowchain position.channel(Function<Channels, MessageChannelSpec<?, ?>> channels) Populate aMessageChannelinstance at the currentIntegrationFlowchain position using theChannelsfactory fluent API.channel(MessageChannelSpec<?, ?> messageChannelSpec) Populate aMessageChannelinstance at the currentIntegrationFlowchain position using theMessageChannelSpecfluent API.channel(MessageChannel messageChannel) Populate the providedMessageChannelinstance at the currentIntegrationFlowchain position.protected voidcheckReuse(MessageProducer replyHandler) claimCheckIn(MessageStore messageStore) claimCheckIn(MessageStore messageStore, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) claimCheckOut(MessageStore messageStore) Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStore.claimCheckOut(MessageStore messageStore, boolean removeMessage) Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStoreandremoveMessageflag.claimCheckOut(MessageStore messageStore, boolean removeMessage, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStoreandremoveMessageflag.Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.controlBus(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.Deprecated, for removal: This API element is subject to removal in a future version.controlBusOnRegistry(Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.5 in favor ofcontrolBus(Consumer)<P> BPopulate theMessageTransformingHandlerinstance for the providedpayloadTypeto convert at runtime.<P> Bconvert(Class<P> payloadType, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerinstance for the providedpayloadTypeto convert at runtime.protected BcurrentComponent(Object component) protected InterceptableChannelReturn the current channel if it is anInterceptableChannel, otherwise register a new implicitDirectChannelin the flow and return that one.protected BcurrentMessageChannel(MessageChannel currentMessageChannel) Populate aDelayHandlerto the current integration flow position with default options.delay(Consumer<DelayerEndpointSpec> endpointConfigurer) Populate aDelayHandlerto the current integration flow position.enrich(Consumer<EnricherSpec> enricherConfigurer) Populate aContentEnricherto the current integration flow position with provided options.enrichHeaders(Consumer<HeaderEnricherSpec> headerEnricherConfigurer) enrichHeaders(Map<String, Object> headers) enrichHeaders(Map<String, Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) enrichHeaders(MapBuilder<?, String, Object> headers) Populate aMessageTransformingHandlerfor aHeaderEnricherusing header values from providedMapBuilder.enrichHeaders(MapBuilder<?, String, Object> headers, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate aMessageTransformingHandlerfor aHeaderEnricherusing header values from providedMapBuilder.protected static ObjectextractProxyTarget(Object target) <P> Bfilter(Class<P> expectedType, GenericSelector<P> genericSelector) <P> Bfilter(Class<P> expectedType, GenericSelector<P> genericSelector, Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor the discovered method of the provided service.Populate aMessageFilterwithMethodInvokingSelectorfor the method of the provided service.filter(Object service, String methodName, Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor the method of the provided service.Populate aMessageFilterwithMessageSelectorfor the provided SpEL expression.filter(String expression, Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMessageSelectorfor the provided SpEL expression.filter(MessageProcessorSpec<?> messageProcessorSpec) Populate aMessageFilterwithMethodInvokingSelectorfor theMessageProcessorfrom the providedMessageProcessorSpec.filter(MessageProcessorSpec<?> messageProcessorSpec, Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor theMessageProcessorfrom the providedMessageProcessorSpec.Populate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position.fixedSubscriberChannel(String messageChannelName) Populate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position.<I,O> B fluxTransform(Function<? super reactor.core.publisher.Flux<Message<I>>, ? extends org.reactivestreams.Publisher<O>> fluxFunction) Populate aFluxMessageChannelto start a reactive processing for upstream data, wrap it to aFlux, apply providedFunctionviaFlux.transform(Function)and emit the result to one moreFluxMessageChannel, subscribed in the downstream flow.Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options.gateway(String requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer) Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with options fromGatewayEndpointSpec.gateway(IntegrationFlow flow) Populate the "artificial"GatewayMessageHandlerfor the providedsubflow.gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer) Populate the "artificial"GatewayMessageHandlerfor the providedsubflowwith options fromGatewayEndpointSpec.gateway(MessageChannel requestChannel) Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options.gateway(MessageChannel requestChannel, Consumer<GatewayEndpointSpec> endpointConfigurer) Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with options fromGatewayEndpointSpec.protected StandardIntegrationFlowget()protected Objectprotected MessageChannel<H extends MessageHandler>
Bhandle(H messageHandler, Consumer<GenericEndpointSpec<H>> endpointConfigurer) Populate aServiceActivatingHandlerfor the providedMessageHandlerimplementation.<P> Bhandle(Class<P> expectedType, GenericHandler<P> handler) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the providedGenericHandlerat runtime.<P> Bhandle(Class<P> expectedType, GenericHandler<P> handler, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the providedGenericHandlerat runtime.Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the discoveredmethodfor providedserviceat runtime.Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.handle(Object service, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.handle(String beanName, String methodName, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.<H extends MessageHandler>
Bhandle(MessageHandlerSpec<?, H> messageHandlerSpec) Populate aServiceActivatingHandlerfor the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.<H extends MessageHandler>
Bhandle(MessageHandlerSpec<?, H> messageHandlerSpec, Consumer<GenericEndpointSpec<H>> endpointConfigurer) Populate aServiceActivatingHandlerfor the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.handle(MessageProcessorSpec<?> messageProcessorSpec) Populate aServiceActivatingHandlerfor theMessageProcessorfrom the providedMessageProcessorSpec.handle(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMessageProcessorfrom the providedMessageProcessorSpec.handle(MessageHandler messageHandler) Populate aServiceActivatingHandlerfor the providedMessageHandlerimplementation.<H extends ReactiveMessageHandler>
IntegrationFlowhandleReactive(ReactiveMessageHandlerSpec<?, H> messageHandlerSpec) Populate a terminal consumer endpoint for the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.<H extends ReactiveMessageHandler>
IntegrationFlowhandleReactive(ReactiveMessageHandlerSpec<?, H> messageHandlerSpec, Consumer<GenericEndpointSpec<ReactiveMessageHandlerAdapter>> endpointConfigurer) Populate a terminal consumer endpoint for the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.handleReactive(ReactiveMessageHandler reactiveMessageHandler) Add aReactiveMessageHandleras a terminalIntegrationFlowoperator.handleReactive(ReactiveMessageHandler reactiveMessageHandler, Consumer<GenericEndpointSpec<ReactiveMessageHandlerAdapter>> endpointConfigurer) Add aReactiveMessageHandleras a terminalIntegrationFlowoperator.headerFilter(String... headersToRemove) Provide theHeaderFilterto the currentStandardIntegrationFlow.headerFilter(Consumer<HeaderFilterSpec> headerFilter) Provide theHeaderFilteroptions via fluent API of theHeaderFilterSpec.headerFilter(HeaderFilter headerFilter, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate the providedMessageTransformingHandlerfor the providedHeaderFilter.intercept(ChannelInterceptor... interceptorArray) Add one or moreChannelInterceptorimplementations to the currentcurrentMessageChannel, in the given order, after any interceptors already registered.protected booleanprotected booleanlog()Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level andorg.springframework.integration.handler.LoggingHandleras a default logging category.Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the provided logging category andINFOlogging level.<P> BPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, the provided logging category andFunctionfor the log message.log(String category, Expression logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOLoggingHandler.Levellogging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.<P> BPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category andFunctionfor the log message.log(Expression logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.log(LoggingHandler.Level level) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for providedLoggingHandler.Levellogging level andorg.springframework.integration.handler.LoggingHandleras a default logging category.log(LoggingHandler.Level level, String category) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level and logging category.log(LoggingHandler.Level level, String category, String logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category and SpEL expression for the log message.<P> BPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category andFunctionfor the log message.log(LoggingHandler.Level level, String category, Expression logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category and SpEL expression for the log message.<P> Blog(LoggingHandler.Level level, Function<Message<P>, Object> function) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category andFunctionfor the log message.log(LoggingHandler.Level level, Expression logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.Add a "nullChannel" bean into this flow definition as a terminal operator.protected MessageChannelpublishSubscribeChannel(Executor executor, Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer) ThePublishSubscribeChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.publishSubscribeChannel(Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer) ThePublishSubscribeChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel, Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer) TheBroadcastCapableChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.protected <S extends ConsumerEndpointSpec<? super S,? extends MessageHandler>>
Bprotected BregisterOutputChannelIfCan(MessageChannel outputChannel) Populate theResequencingMessageHandlerwith default options.resequence(Consumer<ResequencerSpec> resequencer) Populate theResequencingMessageHandlerwith provided options fromResequencerSpec.<P,T> B route(Class<P> expectedType, Function<P, T> router, Consumer<RouterSpec<T, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor providedFunctionand payload type and options fromRouterSpec.<S,T> B Populate theMethodInvokingRouterfor providedFunctionand payload type with default options.Populate theMethodInvokingRouterfor the discovered method of the provided service and its method with default options.Populate theMethodInvokingRouterfor the method of the provided service and its method with default options.route(Object service, String methodName, Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor the method of the provided service and its method with provided options fromRouterSpec.Populate theExpressionEvaluatingRouterfor provided SpEL expression with default options.Populate theMethodInvokingRouterfor provided bean and its method with default options.route(String beanName, String method, Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor provided bean and its method with provided options fromRouterSpec.<T> Broute(String expression, Consumer<RouterSpec<T, ExpressionEvaluatingRouter>> routerConfigurer) Populate theExpressionEvaluatingRouterfor provided SpEL expression with provided options fromRouterSpec.route(MessageProcessorSpec<?> messageProcessorSpec) Populate theMethodInvokingRouterfor theMessageProcessorfrom the providedMessageProcessorSpecwith default options.route(MessageProcessorSpec<?> messageProcessorSpec, Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor theMessageProcessorfrom the providedMessageProcessorSpecwith default options.route(AbstractMessageRouter router) Populate the providedAbstractMessageRouterimplementation to the current integration flow position.<R extends AbstractMessageRouter>
Broute(R router, Consumer<GenericEndpointSpec<R>> endpointConfigurer) Populate the providedAbstractMessageRouterimplementation to the current integration flow position.protected <R extends AbstractMessageRouter,S extends AbstractRouterSpec<? super S, R>>
BrouteByException(Consumer<RouterSpec<Class<? extends Throwable>, ErrorMessageExceptionTypeRouter>> routerConfigurer) Populate theErrorMessageExceptionTypeRouterwith options from theRouterSpec.routeToRecipients(Consumer<RecipientListRouterSpec> routerConfigurer) Populate theRecipientListRouterwith options from theRecipientListRouterSpec.scatterGather(Consumer<RecipientListRouterSpec> scatterer) Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function and defaultAggregatorSpecfor gathering function.scatterGather(Consumer<RecipientListRouterSpec> scatterer, Consumer<AggregatorSpec> gatherer) Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function andAggregatorSpecfor gathering function.scatterGather(Consumer<RecipientListRouterSpec> scatterer, Consumer<AggregatorSpec> gatherer, Consumer<ScatterGatherSpec> scatterGather) Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function andAggregatorSpecfor gathering function.scatterGather(MessageChannel scatterChannel) Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function and defaultAggregatorSpecfor gathering function.scatterGather(MessageChannel scatterChannel, Consumer<AggregatorSpec> gatherer) Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function andAggregatorSpecfor gathering function.scatterGather(MessageChannel scatterChannel, Consumer<AggregatorSpec> gatherer, Consumer<ScatterGatherSpec> scatterGather) Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function andAggregatorSpecfor gathering function.protected voidsetImplicitChannel(boolean implicitChannel) split()Populate theDefaultMessageSplitterwith default options to the current integration flow position.<P> BPopulate theMethodInvokingSplitterto evaluate the providedFunctionat runtime.Populate theExpressionEvaluatingSplitterwith provided SpEL expression.<S extends AbstractMessageSplitter>
Bsplit(MessageHandlerSpec<?, S> splitterMessageHandlerSpec) Populate the providedAbstractMessageSplitterto the current integration flow position.split(MessageProcessorSpec<?> messageProcessorSpec) Populate theMethodInvokingSplitterto evaluate theMessageProcessorat runtime from providedMessageProcessorSpec.split(AbstractMessageSplitter splitter) Populate the providedAbstractMessageSplitterto the current integration flow position.splitWith(Consumer<SplitterSpec> splitterConfigurer) Populate the splitter with provided options to the current integration flow position:to(IntegrationFlow other) Finish this flow with delegation to otherIntegrationFlowinstance.protected <T> org.reactivestreams.Publisher<Message<T>>Represent an Integration Flow as a Reactive StreamsPublisherbean.protected <T> org.reactivestreams.Publisher<Message<T>>toReactivePublisher(boolean autoStartOnSubscribe) Represent an Integration Flow as a Reactive StreamsPublisherbean.<P,T> B transform(Class<P> expectedType, GenericTransformer<P, T> genericTransformer) Populate theMessageTransformingHandlerinstance for the providedGenericTransformerfor the specificexpectedTypeto convert at runtime.Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the discovered service method at runtime.Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the service method at runtime.Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the bean method at runtime.transform(MessageProcessorSpec<?> messageProcessorSpec) Populate theMessageTransformingHandlerinstance for theMessageProcessorfrom providedMessageProcessorSpec.transformWith(Consumer<TransformerEndpointSpec> transformerConfigurer) Populate aMessageTransformingHandlerinto the endpoint with providedTransformerEndpointSpecoptions.Populate aServiceActivatingHandlerinstance to performMessageTriggerAction.trigger(String triggerActionId, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.trigger(MessageTriggerAction triggerAction) Populate aServiceActivatingHandlerinstance to performMessageTriggerAction.trigger(MessageTriggerAction triggerAction, Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(String wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(IntegrationFlow flow) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(IntegrationFlow flow, Consumer<WireTapSpec> wireTapConfigurer) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(WireTapSpec wireTapSpec) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(MessageChannel wireTapChannel) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.wireTap(MessageChannel wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer) Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.
-
Field Details
-
PARSER
-
integrationComponents
-
-
Constructor Details
-
BaseIntegrationFlowDefinition
protected BaseIntegrationFlowDefinition()
-
-
Method Details
-
addComponent
-
addComponent
-
addComponents
-
getIntegrationComponents
-
currentComponent
-
getCurrentComponent
-
currentMessageChannel
-
getCurrentMessageChannel
-
currentInterceptableChannel
Return the current channel if it is anInterceptableChannel, otherwise register a new implicitDirectChannelin the flow and return that one.- Returns:
- the current channel after the operation
-
setImplicitChannel
protected void setImplicitChannel(boolean implicitChannel) -
isImplicitChannel
protected boolean isImplicitChannel() -
fixedSubscriberChannel
Populate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position. The 'bean name' will be generated during the bean registration phase.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
fixedSubscriberChannel
Populate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position. The providedmessageChannelNameis used for the bean registration.- Parameters:
messageChannelName- the bean name to use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
channel
Populate aMessageChannelReferenceinstance at the currentIntegrationFlowchain position. The providedmessageChannelNameis used for the bean registration (DirectChannel), if there is no such a bean in the application context. Otherwise, the existingMessageChannelbean is used to wire integration endpoints.- Parameters:
messageChannelName- the bean name to use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
channel
Populate aMessageChannelinstance at the currentIntegrationFlowchain position using theMessageChannelSpecfluent API.- Parameters:
messageChannelSpec- theMessageChannelSpecto use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
channel
Populate the providedMessageChannelinstance at the currentIntegrationFlowchain position. ThemessageChannelcan be an existing bean, or fresh instance, in which case theIntegrationFlowBeanPostProcessorwill populate it as a bean with a generated name.- Parameters:
messageChannel- theMessageChannelto populate.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
channel
Populate aMessageChannelinstance at the currentIntegrationFlowchain position using theChannelsfactory fluent API.- Parameters:
channels- theFunctionto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
publishSubscribeChannel
ThePublishSubscribeChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.- Parameters:
publishSubscribeChannelConfigurer- theConsumerto specifyPublishSubscribeSpecoptions including 'subflow' definition.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
publishSubscribeChannel
public B publishSubscribeChannel(@Nullable Executor executor, Consumer<PublishSubscribeSpec> publishSubscribeChannelConfigurer) ThePublishSubscribeChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability. Use the providedExecutorfor the target subscribers.- Parameters:
executor- theExecutorto use.publishSubscribeChannelConfigurer- theConsumerto specifyPublishSubscribeSpecoptions including 'subflow' definition.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
publishSubscribeChannel
public B publishSubscribeChannel(BroadcastCapableChannel broadcastCapableChannel, Consumer<BroadcastPublishSubscribeSpec> publishSubscribeChannelConfigurer) TheBroadcastCapableChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.- Parameters:
broadcastCapableChannel- theBroadcastCapableChannelto subscriber sub-flows to.publishSubscribeChannelConfigurer- theConsumerto specifyBroadcastPublishSubscribeSpec'subflow' definitions.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 5.3
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after any.filter("World"::equals) .wireTap(sf -> sf.<String, String>transform(String::toUpperCase)) .handle(p -> process(p))channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
flow- theIntegrationFlowfor wire-tap subflow as an alternative to thewireTapChannel.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after anyf -> f.wireTap("tapChannel") .handle(p -> process(p))channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
wireTapChannel- theMessageChannelbean name to wire-tap.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after any.transform("payload") .wireTap(tapChannel()) .channel("foo")channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
wireTapChannel- theMessageChannelto wire-tap.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after any.transform("payload") .wireTap(sf -> sf.<String, String>transform(String::toUpperCase), wt -> wt.selector("payload == 'foo'")) .channel("foo")channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
flow- theIntegrationFlowfor wire-tap subflow as an alternative to thewireTapChannel.wireTapConfigurer- theConsumerto accept options for theWireTap.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
obtainInputChannelFromFlow
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after any.transform("payload") .wireTap("tapChannel", wt -> wt.selector(m -> m.getPayload().equals("foo"))) .channel("foo")channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
wireTapChannel- theMessageChannelbean name to wire-tap.wireTapConfigurer- theConsumerto accept options for theWireTap.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel. It is useful when an implicitMessageChannelis used between endpoints:
This method can be used after any.transform("payload") .wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo"))) .channel("foo")channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
wireTapChannel- theMessageChannelto wire-tap.wireTapConfigurer- theConsumerto accept options for theWireTap.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
wireTap
Populate theWire TapEI Pattern specificChannelInterceptorimplementation to the currentcurrentMessageChannel.It is useful when an implicit
MessageChannelis used between endpoints:
This method can be used after any.transform("payload") .wireTap(new WireTap(tapChannel()).selector(m -> m.getPayload().equals("foo"))) .channel("foo")channel(java.lang.String)for explicitMessageChannel, but with the caution do not impact existingChannelInterceptors.- Parameters:
wireTapSpec- theWireTapSpecto use.When this EIP-method is used in the end of flow, it appends a
nullChannelto terminate flow properly, Otherwise aDispatcher has no subscribersexception is thrown for implicitDirectChannel.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
controlBusOnRegistry
Deprecated, for removal: This API element is subject to removal in a future version.since 6.5 in favor ofcontrolBus()Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.4
- See Also:
-
controlBusOnRegistry
@Deprecated(since="6.5", forRemoval=true) public B controlBusOnRegistry(@Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.5 in favor ofcontrolBus(Consumer)Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Parameters:
endpointConfigurer- theConsumerto accept integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.4
- See Also:
-
controlBus
Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
controlBus
public B controlBus(@Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Parameters:
endpointConfigurer- theConsumerto accept integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
transform
Populate theTransformerEI Pattern specificMessageHandlerimplementation for the SpELExpression. Shortcut for:.transformWith((transformerSpec) -> transformerSpec.expression(expression))- Parameters:
expression- theTransformerExpression.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
transform
Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the discovered service method at runtime. Shortcut for:.transformWith((transformerSpec) -> transformerSpec.ref(service))- Parameters:
service- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
transform
Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the service method at runtime..transformWith((transformerSpec) -> transformerSpec.ref(service).method(methodName))- Parameters:
service- the service to use.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
transform
Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the bean method at runtime..transformWith((transformerSpec) -> transformerSpec.refName(beanName).method(methodName))- Parameters:
beanName- the name for bean to resolve lazily.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.2
- See Also:
-
transform
Populate theMessageTransformingHandlerinstance for theMessageProcessorfrom providedMessageProcessorSpec.
Shortcut for:.transform(Scripts.script("classpath:myScript.py").variable("foo", bar())).transformWith((transformerSpec) -> transformerSpec.processor(messageProcessorSpec))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
convert
Populate theMessageTransformingHandlerinstance for the providedpayloadTypeto convert at runtime.- Type Parameters:
P- the payload type - 'convert to'.- Parameters:
payloadType- theClassfor expected payload type.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 5.1
- See Also:
-
transform
public <P,T> B transform(@Nullable Class<P> expectedType, GenericTransformer<P, T> genericTransformer) Populate theMessageTransformingHandlerinstance for the providedGenericTransformerfor the specificexpectedTypeto convert at runtime.- Type Parameters:
P- the payload type - 'transform from' orMessage.class.T- the target type - 'transform to'.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the transformer. Conversion to this type will be attempted, if necessary.genericTransformer- theGenericTransformerto populate.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
convert
public <P> B convert(Class<P> payloadType, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerinstance for the providedpayloadTypeto convert at runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Type Parameters:
P- the payload type - 'transform to'.- Parameters:
payloadType- theClassfor expected payload type.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 5.1
- See Also:
-
transformWith
Populate aMessageTransformingHandlerinto the endpoint with providedTransformerEndpointSpecoptions. One of the 'expression', 'ref', 'refName', 'processor' or 'function' must be provided.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.2
-
filter
Populate aMessageFilterwithMessageSelectorfor the provided SpEL expression.- Parameters:
expression- the SpEL expression.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
filter
Populate aMessageFilterwithMessageSelectorfor the provided SpEL expression. In addition, accept options for the integration endpoint usingFilterEndpointSpec:.filter("payload.hot"), e -> e.autoStartup(false))- Parameters:
expression- the SpEL expression.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
filter
Populate aMessageFilterwithMethodInvokingSelectorfor the discovered method of the provided service.- Parameters:
service- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
filter
Populate aMessageFilterwithMethodInvokingSelectorfor the method of the provided service.- Parameters:
service- the service to use.methodName- the method to invoke- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
filter
public B filter(Object service, @Nullable String methodName, @Nullable Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor the method of the provided service.- Parameters:
service- the service to use.methodName- the method to invokeendpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
filter
Populate aMessageFilterwithMethodInvokingSelectorfor theMessageProcessorfrom the providedMessageProcessorSpec..filter(Scripts.script(scriptResource).lang("ruby"))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
filter
public B filter(MessageProcessorSpec<?> messageProcessorSpec, @Nullable Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor theMessageProcessorfrom the providedMessageProcessorSpec. In addition, accept options for the integration endpoint usingFilterEndpointSpec..filter(Scripts.script(scriptResource).lang("ruby"), e -> e.autoStartup(false))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
filter
Populate aMessageFilterwithMethodInvokingSelectorfor the providedGenericSelector. Typically, used with a Java 8 Lambda expression:.filter(Date.class, p -> p.after(new Date()))- Type Parameters:
P- the source payload type orMessage.class.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.genericSelector- theGenericSelectorto use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
filter
public <P> B filter(@Nullable Class<P> expectedType, GenericSelector<P> genericSelector, @Nullable Consumer<FilterEndpointSpec> endpointConfigurer) Populate aMessageFilterwithMethodInvokingSelectorfor the providedGenericSelector. In addition, accept options for the integration endpoint usingFilterEndpointSpec. Typically, used with a Java 8 Lambda expression:.filter(Date.class, p -> p.after(new Date()), e -> e.autoStartup(false))- Type Parameters:
P- the source payload type orMessage.class.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.genericSelector- theGenericSelectorto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
handle
Populate aServiceActivatingHandlerfor the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.Http, Kafka, Files):
..handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))- Type Parameters:
H- the targetMessageHandlertype.- Parameters:
messageHandlerSpec- theMessageHandlerSpecto configure protocol specificMessageHandler.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
Populate aServiceActivatingHandlerfor the providedMessageHandlerimplementation. Can be used as Lambda expression:.handle(m -> logger.info(m.getPayload())- Parameters:
messageHandler- theMessageHandlerto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.- Parameters:
beanName- the bean name to use.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
public B handle(String beanName, @Nullable String methodName, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
beanName- the bean name to use.methodName- the method to invoke.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the discoveredmethodfor providedserviceat runtime.- Parameters:
service- the service object to use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
service- the service object to use.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
public B handle(Object service, @Nullable String methodName, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
service- the service object to use.methodName- the method to invoke.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the providedGenericHandlerat runtime. Typically, used with a Lambda expression:.handle(Integer.class, (p, h) -> p / 2)- Type Parameters:
P- the payload type to expect, orMessage.class.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the handler. Conversion to this type will be attempted, if necessary.handler- the handler to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
handle
public <P> B handle(@Nullable Class<P> expectedType, GenericHandler<P> handler, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the providedGenericHandlerat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Typically, used with a Lambda expression:.handle(Integer.class, (p, h) -> p / 2, e -> e.autoStartup(false))- Type Parameters:
P- the payload type to expect orMessage.class.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif 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- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
handle
Populate aServiceActivatingHandlerfor theMessageProcessorfrom the providedMessageProcessorSpec..handle(Scripts.script("classpath:myScript.ruby"))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
public B handle(MessageProcessorSpec<?> messageProcessorSpec, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerfor theMessageProcessorfrom the providedMessageProcessorSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec..handle(Scripts.script("classpath:myScript.ruby"), e -> e.autoStartup(false))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
public <H extends MessageHandler> B handle(MessageHandlerSpec<?, H> messageHandlerSpec, @Nullable Consumer<GenericEndpointSpec<H>> endpointConfigurer) Populate aServiceActivatingHandlerfor the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.Http, Kafka, Files). In addition, accept options for the integration endpoint usingGenericEndpointSpec. Typically, used with a Lambda expression:.handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"), e -> e.autoStartup(false))- Type Parameters:
H- theMessageHandlertype.- Parameters:
messageHandlerSpec- theMessageHandlerSpecto configure protocol specificMessageHandler.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
handle
public <H extends MessageHandler> B handle(H messageHandler, @Nullable Consumer<GenericEndpointSpec<H>> endpointConfigurer) Populate aServiceActivatingHandlerfor the providedMessageHandlerimplementation. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Can be used as Lambda expression:.handle(m -> logger.info(m.getPayload()), e -> e.autoStartup(false))- Type Parameters:
H- theMessageHandlertype.- Parameters:
messageHandler- theMessageHandlerto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
bridge
Populate aBridgeHandlerto the current integration flow position.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
bridge
Populate aBridgeHandlerto the current integration flow position. Typically, used with a Lambda expression:.bridge(s -> s.poller(Pollers.fixedDelay(100)) .autoStartup(false) .id("priorityChannelBridge"))- Parameters:
endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
delay
Populate aDelayHandlerto the current integration flow position with default options. Shortcut for:.delay(delayer -> delayer.messageGroupId(groupId))- Parameters:
groupId- thegroupIdfor delayed messages in theMessageGroupStore.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
delay
Populate aDelayHandlerto the current integration flow position. TheDelayerEndpointSpec.messageGroupId(String)is required option.- Parameters:
endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.2
- See Also:
-
enrich
Populate aContentEnricherto the current integration flow position with provided options. Typically, used with a Lambda expression:.enrich(e -> e.requestChannel("enrichChannel") .requestPayload(Message::getPayload) .shouldClonePayload(false) .autoStartup(false) .<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))- Parameters:
enricherConfigurer- theConsumerto provideContentEnricheroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
enrichHeaders
Populate aMessageTransformingHandlerfor aHeaderEnricherusing header values from providedMapBuilder. Can be used together with a namespace factory:.enrichHeaders(Mail.headers() .subjectFunction(m -> "foo") .from("foo@bar") .toFunction(m -> new String[] {"bar@baz"}))- Parameters:
headers- theMapBuilderto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
enrichHeaders
public B enrichHeaders(MapBuilder<?, String, Object> headers, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate aMessageTransformingHandlerfor aHeaderEnricherusing header values from providedMapBuilder. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Can be used together with a namespace factory:.enrichHeaders(Mail.headers() .subjectFunction(m -> "foo") .from("foo@bar") .toFunction(m -> new String[] {"bar@baz"}), e -> e.autoStartup(false))- Parameters:
headers- theMapBuilderto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
enrichHeaders
Accept aMapof values to be used for theMessageheader enrichment.valuescan apply anExpressionto be evaluated against a requestMessage.- Parameters:
headers- the Map of headers to enrich.- Returns:
- the current
IntegrationFlowDefinition.
-
enrichHeaders
public B enrichHeaders(Map<String, Object> headers, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Accept aMapof values to be used for theMessageheader enrichment.valuescan apply anExpressionto be evaluated against a requestMessage.- Parameters:
headers- the Map of headers to enrich.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
enrichHeaders
Populate aMessageTransformingHandlerfor aHeaderEnricheras the result of providedConsumer. Typically, used with a Lambda expression:.enrichHeaders(h -> h.header(FileHeaders.FILENAME, "foo.sitest") .header("directory", new File(tmpDir, "fileWritingFlow")))- Parameters:
headerEnricherConfigurer- theConsumerto use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
Populate theDefaultMessageSplitterwith default options to the current integration flow position.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
splitWith
Populate the splitter with provided options to the current integration flow position:
or with the refenrence to POJO service method call:.splitWith(s -> s.applySequence(false).delimiters(",")).splitWith(s -> s.ref("someService").method("someMethod"))- Parameters:
splitterConfigurer- theConsumerto provide options splitter endpoint.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.2
- See Also:
-
split
Populate theExpressionEvaluatingSplitterwith provided SpEL expression.- Parameters:
expression- the splitter SpEL expression. and forExpressionEvaluatingSplitter.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
- Parameters:
service- the service to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
- Parameters:
service- the service to use.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
- Parameters:
beanName- the bean name to use.methodName- the method to invoke at runtime.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
split
Populate theMethodInvokingSplitterto evaluate theMessageProcessorat runtime from providedMessageProcessorSpec..split(Scripts.script("classpath:myScript.ruby"))- Parameters:
messageProcessorSpec- the splitterMessageProcessorSpec.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
Populate theMethodInvokingSplitterto evaluate the providedFunctionat runtime. Typically, used with a Lambda expression:.split(String.class, p -> jdbcTemplate.execute("SELECT * from FOO", (PreparedStatement ps) -> new ResultSetIterator<Foo>(ps.executeQuery(), (rs, rowNum) -> new Foo(rs.getInt(1), rs.getString(2)))))- Type Parameters:
P- the payload type orMessage.class.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the splitter. Conversion to this type will be attempted, if necessary.splitter- the splitterFunction.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?, S> splitterMessageHandlerSpec) Populate the providedAbstractMessageSplitterto the current integration flow position.- Type Parameters:
S- theAbstractMessageSplitter- Parameters:
splitterMessageHandlerSpec- theMessageHandlerSpecto populate.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
split
Populate the providedAbstractMessageSplitterto the current integration flow position.- Parameters:
splitter- theAbstractMessageSplitterto populate.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
headerFilter
Provide theHeaderFilterto the currentStandardIntegrationFlow.- Parameters:
headersToRemove- the array of headers (or patterns) to remove fromMessageHeaders.- Returns:
- this
BaseIntegrationFlowDefinition.
-
headerFilter
Provide theHeaderFilteroptions via fluent API of theHeaderFilterSpec.- Parameters:
headerFilter- theConsumerto provide header filter and its endpoint options.- Returns:
- this
BaseIntegrationFlowDefinition. - Since:
- 6.2
-
headerFilter
public B headerFilter(HeaderFilter headerFilter, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate the providedMessageTransformingHandlerfor the providedHeaderFilter.- Parameters:
headerFilter- theHeaderFilterto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
claimCheckIn
- Parameters:
messageStore- theMessageStoreto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
claimCheckIn
public B claimCheckIn(MessageStore messageStore, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerfor theClaimCheckInTransformerwith providedMessageStore. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
messageStore- theMessageStoreto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
claimCheckOut
Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStore. TheremoveMessageoption ofClaimCheckOutTransformeris tofalse.- Parameters:
messageStore- theMessageStoreto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
claimCheckOut
Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStoreandremoveMessageflag.- Parameters:
messageStore- theMessageStoreto use.removeMessage- the removeMessage boolean flag.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
claimCheckOut
public B claimCheckOut(MessageStore messageStore, boolean removeMessage, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStoreandremoveMessageflag. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
messageStore- theMessageStoreto use.removeMessage- the removeMessage boolean flag.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
resequence
Populate theResequencingMessageHandlerwith default options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
resequence
Populate theResequencingMessageHandlerwith provided options fromResequencerSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Typically, used with a Lambda expression:.resequence(r -> r.releasePartialSequences(true) .correlationExpression("'foo'") .phase(100))- Parameters:
resequencer- theConsumerto provideResequencingMessageHandleroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
aggregate
Populate theAggregatingMessageHandlerwith default options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
aggregate
A short-cut for theaggregate((aggregator) -> aggregator.processor(aggregatorProcessor)).- Parameters:
aggregatorProcessor- the POJO representing aggregation strategies.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 5.5
- See Also:
-
aggregate
Populate theAggregatingMessageHandlerwith provided options fromAggregatorSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Typically, used with a Lambda expression:.aggregate(a -> a.correlationExpression("1") .releaseStrategy(g -> g.size() == 25) .phase(100))- Parameters:
aggregator- theConsumerto provideAggregatingMessageHandleroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
Populate theMethodInvokingRouterfor provided bean and its method with default options.- Parameters:
beanName- the bean to use.method- the method to invoke at runtime.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
public B route(String beanName, @Nullable String method, @Nullable Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor provided bean and its method with provided options fromRouterSpec.- Parameters:
beanName- the bean to use.method- the method to invoke at runtime.routerConfigurer- theConsumerto provideMethodInvokingRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
Populate theMethodInvokingRouterfor the discovered method of the provided service and its method with default options.- Parameters:
service- the bean to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
Populate theMethodInvokingRouterfor the method of the provided service and its method with default options.- Parameters:
service- the service to use.methodName- the method to invoke.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
public B route(Object service, @Nullable String methodName, @Nullable Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor the method of the provided service and its method with provided options fromRouterSpec.- Parameters:
service- the service to use.methodName- the method to invoke.routerConfigurer- theConsumerto provideMethodInvokingRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
Populate theExpressionEvaluatingRouterfor provided SpEL expression with default options.- Parameters:
expression- the expression to use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
public <T> B route(String expression, @Nullable Consumer<RouterSpec<T, ExpressionEvaluatingRouter>> routerConfigurer) Populate theExpressionEvaluatingRouterfor provided SpEL expression with provided options fromRouterSpec.- Type Parameters:
T- the target result type.- Parameters:
expression- the expression to use.routerConfigurer- theConsumerto provideExpressionEvaluatingRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
Populate theMethodInvokingRouterfor providedFunctionand payload type with default options. Typically, used with a Lambda expression:.route(Integer.class, p -> p % 2 == 0)- Type Parameters:
S- the source payload type orMessage.class.T- the target result type.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.router- theFunctionto use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
public <P,T> B route(@Nullable Class<P> expectedType, Function<P, T> router, @Nullable Consumer<RouterSpec<T, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor providedFunctionand payload type and options fromRouterSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec. Typically, used with a Lambda expression:.route(Integer.class, p -> p % 2 == 0, m -> m.channelMapping("true", "evenChannel") .subFlowMapping("false", f -> f.<Integer>handle((p, h) -> p * 3)) .applySequence(false))- Type Parameters:
P- the source payload type orMessage.class.T- the target result type.- Parameters:
expectedType- theClassfor expected payload type. It can also beMessage.classif you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.router- theFunctionto use.routerConfigurer- theConsumerto provideMethodInvokingRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
Populate theMethodInvokingRouterfor theMessageProcessorfrom the providedMessageProcessorSpecwith default options..route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
public B route(MessageProcessorSpec<?> messageProcessorSpec, @Nullable Consumer<RouterSpec<Object, MethodInvokingRouter>> routerConfigurer) Populate theMethodInvokingRouterfor theMessageProcessorfrom the providedMessageProcessorSpecwith default options..route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000), m -> m.channelMapping("true", "evenChannel") .subFlowMapping("false", f -> f.<Integer>handle((p, h) -> p * 3)))- Parameters:
messageProcessorSpec- theMessageProcessorSpecto use.routerConfigurer- theConsumerto provideMethodInvokingRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
protected <R extends AbstractMessageRouter,S extends AbstractRouterSpec<? super S, B routeR>> (S routerSpec, @Nullable Consumer<S> routerConfigurer) -
routeToRecipients
Populate theRecipientListRouterwith options from theRecipientListRouterSpec. Typically, used with a Lambda expression:.routeToRecipients(r -> r .recipient("bar-channel", m -> m.getHeaders().containsKey("recipient") && (boolean) m.getHeaders().get("recipient")) .recipientFlow("'foo' == payload or 'bar' == payload or 'baz' == payload", f -> f.transform(String.class, p -> p.toUpperCase()) .channel(c -> c.queue("recipientListSubFlow1Result"))))- Parameters:
routerConfigurer- theConsumerto provideRecipientListRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
routeByException
public B routeByException(Consumer<RouterSpec<Class<? extends Throwable>, ErrorMessageExceptionTypeRouter>> routerConfigurer) Populate theErrorMessageExceptionTypeRouterwith options from theRouterSpec. Typically, used with a Lambda expression:.routeByException(r -> r .channelMapping(IllegalArgumentException.class, "illegalArgumentChannel") .subFlowMapping(MessageHandlingException.class, sf -> sf.handle(...)) )- Parameters:
routerConfigurer- theConsumerto provideErrorMessageExceptionTypeRouteroptions.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
route
Populate the providedAbstractMessageRouterimplementation to the current integration flow position.- Parameters:
router- theAbstractMessageRouterto populate.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
route
public <R extends AbstractMessageRouter> B route(R router, @Nullable Consumer<GenericEndpointSpec<R>> endpointConfigurer) Populate the providedAbstractMessageRouterimplementation to the current integration flow position. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Type Parameters:
R- theAbstractMessageRoutertype.- Parameters:
router- theAbstractMessageRouterto populate.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options. UsesRequestReplyExchangerProxy on the background.- Parameters:
requestChannel- theMessageChannelbean name.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with options fromGatewayEndpointSpec. UsesRequestReplyExchangerProxy on the background.- Parameters:
requestChannel- theMessageChannelbean name.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options. UsesRequestReplyExchangerProxy on the background.- Parameters:
requestChannel- theMessageChannelto use.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
public B gateway(MessageChannel requestChannel, @Nullable Consumer<GatewayEndpointSpec> endpointConfigurer) Populate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with options fromGatewayEndpointSpec. UsesRequestReplyExchangerProxy on the background.- Parameters:
requestChannel- theMessageChannelto use.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
Populate the "artificial"GatewayMessageHandlerfor the providedsubflow. Typically, used with aLambda expression:.gateway(f -> f.transform("From Gateway SubFlow: "::concat))- Parameters:
flow- theIntegrationFlowto to send a request message and wait for reply.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
gateway
Populate the "artificial"GatewayMessageHandlerfor the providedsubflowwith options fromGatewayEndpointSpec. Typically, used with a Lambda expression:.gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L))- Parameters:
flow- theIntegrationFlowto to send a request message and wait for reply.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level andorg.springframework.integration.handler.LoggingHandleras a default logging category.The full request
Messagewill be logged.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for providedLoggingHandler.Levellogging level andorg.springframework.integration.handler.LoggingHandleras a default logging category.The full request
Messagewill be logged.- Parameters:
level- theLoggingHandler.Level.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the provided logging category andINFOlogging level.The full request
Messagewill be logged.- Parameters:
category- the logging category to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level and logging category.The full request
Messagewill be logged.- Parameters:
level- theLoggingHandler.Level.category- the logging category to use.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category and SpEL expression for the log message.- Parameters:
level- theLoggingHandler.Level.category- the logging category.logExpression- the SpEL expression to evaluate logger message at runtime against the requestMessage.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category andFunctionfor the log message.- Type Parameters:
P- the expected payload type. against the requestMessage.- Parameters:
function- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOlogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.- Parameters:
logExpression- theExpressionto evaluate logger message at runtime against the requestMessage.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.- Parameters:
level- theLoggingHandler.Level.logExpression- theExpressionto evaluate logger message at runtime against the requestMessage.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for theINFOLoggingHandler.Levellogging level, the provided logging category and SpEL expression to evaluate logger message at runtime against the requestMessage.- Parameters:
category- the logging category.logExpression- theExpressionto evaluate logger message at runtime against the requestMessage.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, theorg.springframework.integration.handler.LoggingHandleras a default logging category andFunctionfor the log message.- Type Parameters:
P- the expected payload type. against the requestMessage.- Parameters:
level- theLoggingHandler.Level.function- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, the provided logging category andFunctionfor the log message.- Type Parameters:
P- the expected payload type. against the requestMessage.- Parameters:
category- the logging category.function- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
public <P> B log(LoggingHandler.Level level, @Nullable String category, Function<Message<P>, Object> function) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category andFunctionfor the log message.- Type Parameters:
P- the expected payload type. against the requestMessage.- Parameters:
level- theLoggingHandler.Level.category- the logging category.function- the function to evaluate logger message at runtime- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
log
public B log(LoggingHandler.Level level, @Nullable String category, @Nullable Expression logExpression) Populate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category and SpEL expression for the log message.- Parameters:
level- theLoggingHandler.Level.category- the logging category.logExpression- theExpressionto evaluate logger message at runtime against the requestMessage.- Returns:
- the current
BaseIntegrationFlowDefinition. - See Also:
-
scatterGather
Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function and defaultAggregatorSpecfor gathering function.- Parameters:
scatterChannel- theMessageChannelfor scatting requests.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
scatterGather
Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function andAggregatorSpecfor gathering function.- Parameters:
scatterChannel- theMessageChannelfor scatting requests.gatherer- theConsumerforAggregatorSpecto configure gatherer. Can benull.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
scatterGather
public B scatterGather(MessageChannel scatterChannel, @Nullable Consumer<AggregatorSpec> gatherer, @Nullable Consumer<ScatterGatherSpec> scatterGather) Populate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function andAggregatorSpecfor gathering function.- Parameters:
scatterChannel- theMessageChannelfor scatting requests.gatherer- theConsumerforAggregatorSpecto configure gatherer. Can benull.scatterGather- theConsumerforScatterGatherSpecto configureScatterGatherHandlerand its endpoint. Can benull.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
scatterGather
Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function and defaultAggregatorSpecfor gathering function.- Parameters:
scatterer- theConsumerforRecipientListRouterSpecto configure scatterer.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
scatterGather
public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Consumer<AggregatorSpec> gatherer) Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function andAggregatorSpecfor gathering function.- Parameters:
scatterer- theConsumerforRecipientListRouterSpecto configure scatterer. Can benull.gatherer- theConsumerforAggregatorSpecto configure gatherer. Can benull.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
scatterGather
public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Consumer<AggregatorSpec> gatherer, @Nullable Consumer<ScatterGatherSpec> scatterGather) Populate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function andAggregatorSpecfor gathering function. For convenience, theAbstractRouterSpec.applySequence(boolean)is set to true by default.- Parameters:
scatterer- theConsumerforRecipientListRouterSpecto configure scatterer.gatherer- theConsumerforAggregatorSpecto configure gatherer.scatterGather- theConsumerforScatterGatherSpecto configureScatterGatherHandlerand its endpoint. Can benull.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
barrier
Populate aBarrierMessageHandlerinstance for provided timeout.- Parameters:
timeout- the timeout in milliseconds.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
barrier
Populate aBarrierMessageHandlerinstance for provided timeout and options fromBarrierSpecand endpoint options fromGenericEndpointSpec.- Parameters:
timeout- the timeout in milliseconds.barrierConfigurer- theConsumerto provideBarrierMessageHandleroptions.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
trigger
Populate aServiceActivatingHandlerinstance to performMessageTriggerAction.- Parameters:
triggerActionId- theMessageTriggerActionbean id.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
trigger
public B trigger(String triggerActionId, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.- Parameters:
triggerActionId- theMessageTriggerActionbean id.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
trigger
Populate aServiceActivatingHandlerinstance to performMessageTriggerAction.- Parameters:
triggerAction- theMessageTriggerAction.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
trigger
public B trigger(MessageTriggerAction triggerAction, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.- Parameters:
triggerAction- theMessageTriggerAction.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
intercept
Add one or moreChannelInterceptorimplementations to the currentcurrentMessageChannel, in the given order, after any interceptors already registered.- Parameters:
interceptorArray- one or moreChannelInterceptors.- Returns:
- the current
BaseIntegrationFlowDefinition. - Throws:
IllegalArgumentException- if one or more null arguments are provided- Since:
- 5.3
-
fluxTransform
public <I,O> B fluxTransform(Function<? super reactor.core.publisher.Flux<Message<I>>, ? extends org.reactivestreams.Publisher<O>> fluxFunction) Populate aFluxMessageChannelto start a reactive processing for upstream data, wrap it to aFlux, apply providedFunctionviaFlux.transform(Function)and emit the result to one moreFluxMessageChannel, subscribed in the downstream flow.- Type Parameters:
I- the input payload type.O- the output type.- Parameters:
fluxFunction- theFunctionto process data reactive manner.- Returns:
- the current
BaseIntegrationFlowDefinition.
-
nullChannel
Add a "nullChannel" bean into this flow definition as a terminal operator.- Returns:
- The
IntegrationFlowinstance based on this definition. - Since:
- 5.1
-
handleReactive
public <H extends ReactiveMessageHandler> IntegrationFlow handleReactive(ReactiveMessageHandlerSpec<?, H> messageHandlerSpec) Populate a terminal consumer endpoint for the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.Http, Kafka, Files). In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Type Parameters:
H- theMessageHandlertype.- Parameters:
messageHandlerSpec- theMessageHandlerSpecto configure the protocol specificMessageHandler.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.1
-
handleReactive
public <H extends ReactiveMessageHandler> IntegrationFlow handleReactive(ReactiveMessageHandlerSpec<?, H> messageHandlerSpec, @Nullable Consumer<GenericEndpointSpec<ReactiveMessageHandlerAdapter>> endpointConfigurer) Populate a terminal consumer endpoint for the selected protocol specificMessageHandlerimplementation from the respective namespace factory (e.g.Http, Kafka, Files). In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Type Parameters:
H- theMessageHandlertype.- Parameters:
messageHandlerSpec- theMessageHandlerSpecto configure the protocol specificMessageHandler.endpointConfigurer- theConsumerto provide integration endpoint options.- Returns:
- the current
BaseIntegrationFlowDefinition. - Since:
- 6.1
-
handleReactive
Add aReactiveMessageHandleras a terminalIntegrationFlowoperator.- Parameters:
reactiveMessageHandler- theReactiveMessageHandlerto finish the flow.- Returns:
- The
IntegrationFlowinstance based on this definition. - Since:
- 6.1
-
handleReactive
public IntegrationFlow handleReactive(ReactiveMessageHandler reactiveMessageHandler, @Nullable Consumer<GenericEndpointSpec<ReactiveMessageHandlerAdapter>> endpointConfigurer) Add aReactiveMessageHandleras a terminalIntegrationFlowoperator.- Parameters:
reactiveMessageHandler- theReactiveMessageHandlerto finish the flow.endpointConfigurer- theConsumerto configure a target endpoint for the handler.- Returns:
- The
IntegrationFlowinstance based on this definition. - Since:
- 6.1
-
to
Finish this flow with delegation to otherIntegrationFlowinstance.- Parameters:
other- theIntegrationFlowto compose with.- Returns:
- The
IntegrationFlowinstance based on this definition. - Since:
- 5.5.4
-
toReactivePublisher
Represent an Integration Flow as a Reactive StreamsPublisherbean.- Type Parameters:
T- the expectedpayloadtype- Returns:
- the Reactive Streams
Publisher
-
toReactivePublisher
protected <T> org.reactivestreams.Publisher<Message<T>> toReactivePublisher(boolean autoStartOnSubscribe) Represent an Integration Flow as a Reactive StreamsPublisherbean.- Type Parameters:
T- the expectedpayloadtype- Parameters:
autoStartOnSubscribe- start message production and consumption in the flow, when a subscription to the publisher is initiated. If this set to true, the flow is marked to not start automatically by the application context.- Returns:
- the Reactive Streams
Publisher - Since:
- 5.5.6
-
register
protected <S extends ConsumerEndpointSpec<? super S,? extends MessageHandler>> B register(S endpointSpec, @Nullable Consumer<? super S> endpointConfigurer) -
registerOutputChannelIfCan
-
isOutputChannelRequired
protected boolean isOutputChannelRequired() -
_this
-
get
-
checkReuse
-
extractProxyTarget
-
controlBus()