Class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlowDefinition<B>>
java.lang.Object
org.springframework.integration.dsl.BaseIntegrationFlowDefinition<B>
- Type Parameters:
- B- the- BaseIntegrationFlowDefinitionimplementation 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
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final class
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.<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(String groupId, Consumer<DelayerEndpointSpec> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.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(String headersToRemove, boolean patternMatch) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofheaderFilter(Consumer)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.<P> Bsplit(Class<P> expectedType, Function<P, ?> splitter, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).split(Object service, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theExpressionEvaluatingSplitterwith provided SpEL expression.split(String beanName, String methodName, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).split(Consumer<SplitterEndpointSpec<DefaultMessageSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).<S extends AbstractMessageSplitter>
 Bsplit(MessageHandlerSpec<?, S> splitterMessageHandlerSpec) Populate the providedAbstractMessageSplitterto the current integration flow position.<S extends AbstractMessageSplitter>
 Bsplit(MessageHandlerSpec<?, S> splitterMessageHandlerSpec, Consumer<SplitterEndpointSpec<S>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).split(MessageProcessorSpec<?> messageProcessorSpec) Populate theMethodInvokingSplitterto evaluate theMessageProcessorat runtime from providedMessageProcessorSpec.split(MessageProcessorSpec<?> messageProcessorSpec, Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).split(AbstractMessageSplitter splitter) Populate the providedAbstractMessageSplitterto the current integration flow position.<S extends AbstractMessageSplitter>
 Bsplit(S splitter, Consumer<SplitterEndpointSpec<S>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).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.<P,T> B transform(Class<P> expectedType, GenericTransformer<P, T> genericTransformer, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer)Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the discovered service method at runtime.Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the service method at runtime.transform(Object service, String methodName, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the bean method at runtime.transform(String expression, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).transform(MessageProcessorSpec<?> messageProcessorSpec) Populate theMessageTransformingHandlerinstance for theMessageProcessorfrom providedMessageProcessorSpec.transform(MessageProcessorSpec<?> messageProcessorSpec, Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).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- 
BaseIntegrationFlowDefinitionprotected BaseIntegrationFlowDefinition()
 
- 
- 
Method Details- 
addComponent
- 
addComponent
- 
addComponents
- 
getIntegrationComponents
- 
currentComponent
- 
getCurrentComponent
- 
currentMessageChannel
- 
getCurrentMessageChannel
- 
currentInterceptableChannelReturn 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
 
- 
setImplicitChannelprotected void setImplicitChannel(boolean implicitChannel) 
- 
isImplicitChannelprotected boolean isImplicitChannel()
- 
fixedSubscriberChannelPopulate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position. The 'bean name' will be generated during the bean registration phase.- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
fixedSubscriberChannelPopulate anFixedSubscriberChannelinstance at the currentIntegrationFlowchain position. The providedmessageChannelNameis used for the bean registration.- Parameters:
- messageChannelName- the bean name to use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
channelPopulate 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.
 
- 
channelPopulate aMessageChannelinstance at the currentIntegrationFlowchain position using theMessageChannelSpecfluent API.- Parameters:
- messageChannelSpec- the- MessageChannelSpecto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
channelPopulate 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- the- MessageChannelto populate.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
channelPopulate aMessageChannelinstance at the currentIntegrationFlowchain position using theChannelsfactory fluent API.- Parameters:
- channels- the- Functionto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
publishSubscribeChannelThePublishSubscribeChannelchannel(java.lang.String)method specific implementation to allow the use of the 'subflow' subscriber capability.- Parameters:
- publishSubscribeChannelConfigurer- the- Consumerto specify- PublishSubscribeSpecoptions including 'subflow' definition.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
publishSubscribeChannelpublic 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- the- Executorto use.
- publishSubscribeChannelConfigurer- the- Consumerto specify- PublishSubscribeSpecoptions including 'subflow' definition.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
publishSubscribeChannelpublic 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- the- BroadcastCapableChannelto subscriber sub-flows to.
- publishSubscribeChannelConfigurer- the- Consumerto specify- BroadcastPublishSubscribeSpec'subflow' definitions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 5.3
 
- 
wireTapPopulate 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- the- IntegrationFlowfor wire-tap subflow as an alternative to the- wireTapChannel.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
wireTapPopulate 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- the- MessageChannelbean name to wire-tap.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
wireTapPopulate 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- the- MessageChannelto wire-tap.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
wireTapPopulate 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- the- IntegrationFlowfor wire-tap subflow as an alternative to the- wireTapChannel.
- wireTapConfigurer- the- Consumerto accept options for the- WireTap.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
obtainInputChannelFromFlow
- 
wireTapPopulate 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- the- MessageChannelbean name to wire-tap.
- wireTapConfigurer- the- Consumerto accept options for the- WireTap.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
wireTapPopulate 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- the- MessageChannelto wire-tap.
- wireTapConfigurer- the- Consumerto accept options for the- WireTap.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
wireTapPopulate 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- the- WireTapSpecto use.- When this EIP-method is used in the end of flow, it appends a - nullChannelto terminate flow properly, Otherwise a- Dispatcher has no subscribersexception is thrown for implicit- DirectChannel.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
controlBusPopulate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
controlBuspublic B controlBus(@Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate theControl BusEI Pattern specificMessageHandlerimplementation at the currentIntegrationFlowchain position.- Parameters:
- endpointConfigurer- the- Consumerto accept integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transformPopulate theTransformerEI Pattern specificMessageHandlerimplementation for the SpELExpression. Shortcut for:.transformWith((transformerSpec) -> transformerSpec.expression(expression))- Parameters:
- expression- the- Transformer- Expression.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transform@Deprecated(since="6.2", forRemoval=true) public B transform(String expression, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).- Parameters:
- expression- the- Transformer- Expression.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transformPopulate 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:
 
- 
transformPopulate 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:
 
- 
transformPopulate 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@Deprecated(since="6.2", forRemoval=true) public B transform(Object service, @Nullable String methodName, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).Populate theMessageTransformingHandlerfor theMethodInvokingTransformerto invoke the service method at runtime.- Parameters:
- service- the service to use.
- methodName- the method to invoke.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transformPopulate theMessageTransformingHandlerinstance for theMessageProcessorfrom providedMessageProcessorSpec.
 Shortcut for:.transform(Scripts.script("classpath:myScript.py").variable("foo", bar())).transformWith((transformerSpec) -> transformerSpec.processor(messageProcessorSpec))- Parameters:
- messageProcessorSpec- the- MessageProcessorSpecto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transform@Deprecated(since="6.2", forRemoval=true) public B transform(MessageProcessorSpec<?> messageProcessorSpec, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer).Populate theMessageTransformingHandlerinstance for theMessageProcessorfrom providedMessageProcessorSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec..transform(Scripts.script("classpath:myScript.py").variable("foo", bar()), e -> e.autoStartup(false))- Parameters:
- messageProcessorSpec- the- MessageProcessorSpecto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
convertPopulate theMessageTransformingHandlerinstance for the providedpayloadTypeto convert at runtime.- Type Parameters:
- P- the payload type - 'convert to'.
- Parameters:
- payloadType- the- Classfor expected payload type.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 5.1
- See Also:
 
- 
transformpublic <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' or- Message.class.
- T- the target type - 'transform to'.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the transformer. Conversion to this type will be attempted, if necessary.
- genericTransformer- the- GenericTransformerto populate.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
convertpublic <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- the- Classfor expected payload type.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 5.1
- See Also:
 
- 
transform@Deprecated(since="6.2", forRemoval=true) public <P,T> B transform(@Nullable Class<P> expectedType, GenericTransformer<P, T> genericTransformer, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor oftransformWith(Consumer)Populate theMessageTransformingHandlerinstance for the providedGenericTransformerfor the specificexpectedTypeto convert at runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Type Parameters:
- P- the payload type - 'transform from', or- Message.class.
- T- the target type - 'transform to'.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the transformer. Conversion to this type will be attempted, if necessary.
- genericTransformer- the- GenericTransformerto populate.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
transformWithPopulate aMessageTransformingHandlerinto the endpoint with providedTransformerEndpointSpecoptions. One of the 'expression', 'ref', 'refName', 'processor' or 'function' must be provided.- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 6.2
 
- 
filterPopulate aMessageFilterwithMessageSelectorfor the provided SpEL expression.- Parameters:
- expression- the SpEL expression.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
filterPopulate 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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
filterPopulate aMessageFilterwithMethodInvokingSelectorfor the discovered method of the provided service.- Parameters:
- service- the service to use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
filterPopulate aMessageFilterwithMethodInvokingSelectorfor the method of the provided service.- Parameters:
- service- the service to use.
- methodName- the method to invoke
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
filterpublic 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 invoke
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
filterPopulate aMessageFilterwithMethodInvokingSelectorfor theMessageProcessorfrom the providedMessageProcessorSpec..filter(Scripts.script(scriptResource).lang("ruby"))- Parameters:
- messageProcessorSpec- the- MessageProcessorSpecto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
filterpublic 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- the- MessageProcessorSpecto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
filterPopulate 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 or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.
- genericSelector- the- GenericSelectorto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
filterpublic <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 or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the selector. Conversion to this type will be attempted, if necessary.
- genericSelector- the- GenericSelectorto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
handlePopulate 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 target- MessageHandlertype.
- Parameters:
- messageHandlerSpec- the- MessageHandlerSpecto configure protocol specific- MessageHandler.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlePopulate aServiceActivatingHandlerfor the providedMessageHandlerimplementation. Can be used as Lambda expression:.handle(m -> logger.info(m.getPayload())- Parameters:
- messageHandler- the- MessageHandlerto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlePopulate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke themethodfor providedbeanat runtime.- Parameters:
- beanName- the bean name to use.
- methodName- the method to invoke.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlepublic 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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlePopulate aServiceActivatingHandlerfor theMethodInvokingMessageProcessorto invoke the discoveredmethodfor providedserviceat runtime.- Parameters:
- service- the service object to use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlePopulate 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.
 
- 
handlepublic 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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlePopulate 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, or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.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:
 
- 
handlepublic <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 or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
handlePopulate aServiceActivatingHandlerfor theMessageProcessorfrom the providedMessageProcessorSpec..handle(Scripts.script("classpath:myScript.ruby"))- Parameters:
- messageProcessorSpec- the- MessageProcessorSpecto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlepublic 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- the- MessageProcessorSpecto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlepublic <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- the- MessageHandlertype.
- Parameters:
- messageHandlerSpec- the- MessageHandlerSpecto configure protocol specific- MessageHandler.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
handlepublic <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- the- MessageHandlertype.
- Parameters:
- messageHandler- the- MessageHandlerto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
bridgePopulate aBridgeHandlerto the current integration flow position.- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
bridgePopulate 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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
delayPopulate aDelayHandlerto the current integration flow position with default options. Shortcut for:.delay(delayer -> delayer.messageGroupId(groupId))- Parameters:
- groupId- the- groupIdfor delayed messages in the- MessageGroupStore.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
delay@Deprecated(since="6.2", forRemoval=true) public B delay(String groupId, @Nullable Consumer<DelayerEndpointSpec> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofdelay(Consumer)Populate aDelayHandlerto the current integration flow position.- Parameters:
- groupId- the- groupIdfor delayed messages in the- MessageGroupStore.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
delayPopulate aDelayHandlerto the current integration flow position. TheDelayerEndpointSpec.messageGroupId(String)is required option.- Parameters:
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 6.2
- See Also:
 
- 
enrichPopulate 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- the- Consumerto provide- ContentEnricheroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
enrichHeadersPopulate 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- the- MapBuilderto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
enrichHeaderspublic 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- the- MapBuilderto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
enrichHeadersAccept 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.
 
- 
enrichHeaderspublic 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- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
enrichHeadersPopulate 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- the- Consumerto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitPopulate theDefaultMessageSplitterwith default options to the current integration flow position.- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
split@Deprecated(since="6.2", forRemoval=true) public B split(@Nullable Consumer<SplitterEndpointSpec<DefaultMessageSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theDefaultMessageSplitterwith provided options to the current integration flow position. Typically, used with a Lambda expression:.split(s -> s.applySequence(false).delimiters(","))- Parameters:
- endpointConfigurer- the- Consumerto provide integration endpoint options and for- DefaultMessageSplitter.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitWithPopulate 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- the- Consumerto provide options splitter endpoint.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 6.2
- See Also:
 
- 
splitPopulate theExpressionEvaluatingSplitterwith provided SpEL expression.- Parameters:
- expression- the splitter SpEL expression. and for- ExpressionEvaluatingSplitter.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
split@Deprecated(since="6.2", forRemoval=true) public B split(String expression, @Nullable Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theExpressionEvaluatingSplitterwith provided SpEL expression.- Parameters:
- expression- the splitter SpEL expression.
- endpointConfigurer- the- Consumerto provide integration endpoint options and for- ExpressionEvaluatingSplitter.
- 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@Deprecated(since="6.2", forRemoval=true) public B split(Object service, @Nullable String methodName, @Nullable Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theMethodInvokingSplitterto evaluate the providedmethodof thebeanat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
- service- the service to use.
- methodName- the method to invoke.
- endpointConfigurer- the- Consumerto provide integration endpoint options and for- MethodInvokingSplitter.
- 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@Deprecated(since="6.2", forRemoval=true) public B split(String beanName, @Nullable String methodName, @Nullable Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theMethodInvokingSplitterto evaluate the providedmethodof thebeanat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
- beanName- the bean name to use.
- methodName- the method to invoke at runtime.
- endpointConfigurer- the- Consumerto provide integration endpoint options and for- MethodInvokingSplitter.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitPopulate theMethodInvokingSplitterto evaluate theMessageProcessorat runtime from providedMessageProcessorSpec..split(Scripts.script("classpath:myScript.ruby"))- Parameters:
- messageProcessorSpec- the splitter- MessageProcessorSpec.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
split@Deprecated(since="6.2", forRemoval=true) public B split(MessageProcessorSpec<?> messageProcessorSpec, @Nullable Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theMethodInvokingSplitterto evaluate theMessageProcessorat runtime from providedMessageProcessorSpec. In addition, accept options for the integration endpoint usingGenericEndpointSpec..split(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000), , e -> e.applySequence(false))- Parameters:
- messageProcessorSpec- the splitter- MessageProcessorSpec.
- endpointConfigurer- the- Consumerto provide integration endpoint options and for- MethodInvokingSplitter.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitPopulate 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 or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the splitter. Conversion to this type will be attempted, if necessary.
- splitter- the splitter- Function.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
split@Deprecated(since="6.2", forRemoval=true) public <P> B split(@Nullable Class<P> expectedType, Function<P, ?> splitter, @Nullable Consumer<SplitterEndpointSpec<MethodInvokingSplitter>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate theMethodInvokingSplitterto evaluate the providedFunctionat runtime. In addition, accept options for the integration endpoint usingGenericEndpointSpec. 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)))) , e -> e.applySequence(false))- Type Parameters:
- P- the payload type or- Message.class.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif 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- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitpublic <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?, S> splitterMessageHandlerSpec) Populate the providedAbstractMessageSplitterto the current integration flow position.- Type Parameters:
- S- the- AbstractMessageSplitter
- Parameters:
- splitterMessageHandlerSpec- the- MessageHandlerSpecto populate.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
split@Deprecated(since="6.2", forRemoval=true) public <S extends AbstractMessageSplitter> B split(MessageHandlerSpec<?, S> splitterMessageHandlerSpec, @Nullable Consumer<SplitterEndpointSpec<S>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate the providedAbstractMessageSplitterto the current integration flow position.- Type Parameters:
- S- the- AbstractMessageSplitter
- Parameters:
- splitterMessageHandlerSpec- the- MessageHandlerSpecto populate.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
splitPopulate the providedAbstractMessageSplitterto the current integration flow position.- Parameters:
- splitter- the- AbstractMessageSplitterto populate.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
split@Deprecated(since="6.2", forRemoval=true) public <S extends AbstractMessageSplitter> B split(S splitter, @Nullable Consumer<SplitterEndpointSpec<S>> endpointConfigurer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofsplitWith(Consumer).Populate the providedAbstractMessageSplitterto the current integration flow position.- Type Parameters:
- S- the- AbstractMessageSplitter
- Parameters:
- splitter- the- AbstractMessageSplitterto populate.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
headerFilterProvide theHeaderFilterto the currentStandardIntegrationFlow.- Parameters:
- headersToRemove- the array of headers (or patterns) to remove from- MessageHeaders.
- Returns:
- this BaseIntegrationFlowDefinition.
 
- 
headerFilter@Deprecated(since="6.2", forRemoval=true) public B headerFilter(String headersToRemove, boolean patternMatch) Deprecated, for removal: This API element is subject to removal in a future version.since 6.2 in favor ofheaderFilter(Consumer)Provide theHeaderFilterto the currentStandardIntegrationFlow.- Parameters:
- headersToRemove- the comma separated headers (or patterns) to remove from- MessageHeaders.
- patternMatch- the- booleanflag to indicate if- headersToRemoveshould be interpreted as patterns or direct header names.
- Returns:
- this BaseIntegrationFlowDefinition.
 
- 
headerFilterProvide theHeaderFilteroptions via fluent API of theHeaderFilterSpec.- Parameters:
- headerFilter- the- Consumerto provide header filter and its endpoint options.
- Returns:
- this BaseIntegrationFlowDefinition.
- Since:
- 6.2
 
- 
headerFilterpublic B headerFilter(HeaderFilter headerFilter, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate the providedMessageTransformingHandlerfor the providedHeaderFilter.- Parameters:
- headerFilter- the- HeaderFilterto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
claimCheckIn- Parameters:
- messageStore- the- MessageStoreto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
claimCheckInpublic B claimCheckIn(MessageStore messageStore, @Nullable Consumer<GenericEndpointSpec<MessageTransformingHandler>> endpointConfigurer) Populate theMessageTransformingHandlerfor theClaimCheckInTransformerwith providedMessageStore. In addition, accept options for the integration endpoint usingGenericEndpointSpec.- Parameters:
- messageStore- the- MessageStoreto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
claimCheckOutPopulate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStore. TheremoveMessageoption ofClaimCheckOutTransformeris tofalse.- Parameters:
- messageStore- the- MessageStoreto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
claimCheckOutPopulate theMessageTransformingHandlerfor theClaimCheckOutTransformerwith providedMessageStoreandremoveMessageflag.- Parameters:
- messageStore- the- MessageStoreto use.
- removeMessage- the removeMessage boolean flag.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
claimCheckOutpublic 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- the- MessageStoreto use.
- removeMessage- the removeMessage boolean flag.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
resequencePopulate theResequencingMessageHandlerwith default options.- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
resequencePopulate 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- the- Consumerto provide- ResequencingMessageHandleroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
aggregatePopulate theAggregatingMessageHandlerwith default options.- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
aggregateA short-cut for theaggregate((aggregator) -> aggregator.processor(aggregatorProcessor)).- Parameters:
- aggregatorProcessor- the POJO representing aggregation strategies.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 5.5
- See Also:
 
- 
aggregatePopulate 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- the- Consumerto provide- AggregatingMessageHandleroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
routePopulate 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.
 
- 
routepublic 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- the- Consumerto provide- MethodInvokingRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routePopulate 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:
 
- 
routePopulate 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:
 
- 
routepublic 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- the- Consumerto provide- MethodInvokingRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
routePopulate theExpressionEvaluatingRouterfor provided SpEL expression with default options.- Parameters:
- expression- the expression to use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routepublic <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- the- Consumerto provide- ExpressionEvaluatingRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routePopulate 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 or- Message.class.
- T- the target result type.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.
- router- the- Functionto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
routepublic <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 or- Message.class.
- T- the target result type.
- Parameters:
- expectedType- the- Classfor expected payload type. It can also be- Message.classif you wish to access the entire message in the router. Conversion to this type will be attempted, if necessary.
- router- the- Functionto use.
- routerConfigurer- the- Consumerto provide- MethodInvokingRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
routePopulate theMethodInvokingRouterfor theMessageProcessorfrom the providedMessageProcessorSpecwith default options..route(Scripts.script(myScriptResource).lang("groovy").refreshCheckDelay(1000))- Parameters:
- messageProcessorSpec- the- MessageProcessorSpecto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routepublic 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- the- MessageProcessorSpecto use.
- routerConfigurer- the- Consumerto provide- MethodInvokingRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routeprotected <R extends AbstractMessageRouter,S extends AbstractRouterSpec<? super S, B routeR>> (S routerSpec, @Nullable Consumer<S> routerConfigurer) 
- 
routeToRecipientsPopulate 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- the- Consumerto provide- RecipientListRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routeByExceptionpublic 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- the- Consumerto provide- ErrorMessageExceptionTypeRouteroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
routePopulate the providedAbstractMessageRouterimplementation to the current integration flow position.- Parameters:
- router- the- AbstractMessageRouterto populate.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
routepublic <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- the- AbstractMessageRoutertype.
- Parameters:
- router- the- AbstractMessageRouterto populate.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewayPopulate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options. UsesRequestReplyExchangerProxy on the background.- Parameters:
- requestChannel- the- MessageChannelbean name.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewayPopulate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with options fromGatewayEndpointSpec. UsesRequestReplyExchangerProxy on the background.- Parameters:
- requestChannel- the- MessageChannelbean name.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewayPopulate the "artificial"GatewayMessageHandlerfor the providedrequestChannelto send a request with default options. UsesRequestReplyExchangerProxy on the background.- Parameters:
- requestChannel- the- MessageChannelto use.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewaypublic 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- the- MessageChannelto use.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewayPopulate the "artificial"GatewayMessageHandlerfor the providedsubflow. Typically, used with aLambda expression:.gateway(f -> f.transform("From Gateway SubFlow: "::concat))- Parameters:
- flow- the- IntegrationFlowto to send a request message and wait for reply.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
gatewayPopulate 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- the- IntegrationFlowto to send a request message and wait for reply.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
logPopulate 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:
 
- 
logPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for providedLoggingHandler.Levellogging level andorg.springframework.integration.handler.LoggingHandleras a default logging category.The full request Messagewill be logged.- Parameters:
- level- the- LoggingHandler.Level.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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:
 
- 
logPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level and logging category.The full request Messagewill be logged.- Parameters:
- level- the- LoggingHandler.Level.
- category- the logging category to use.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate aWireTapfor thecurrentMessageChannelwith theLoggingHandlersubscriber for the providedLoggingHandler.Levellogging level, logging category and SpEL expression for the log message.- Parameters:
- level- the- LoggingHandler.Level.
- category- the logging category.
- logExpression- the SpEL expression to evaluate logger message at runtime against the request- Message.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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 request- Message.
- Parameters:
- function- the function to evaluate logger message at runtime
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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- the- Expressionto evaluate logger message at runtime against the request- Message.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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- the- LoggingHandler.Level.
- logExpression- the- Expressionto evaluate logger message at runtime against the request- Message.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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- the- Expressionto evaluate logger message at runtime against the request- Message.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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 request- Message.
- Parameters:
- level- the- LoggingHandler.Level.
- function- the function to evaluate logger message at runtime
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logPopulate 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 request- Message.
- Parameters:
- category- the logging category.
- function- the function to evaluate logger message at runtime
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logpublic <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 request- Message.
- Parameters:
- level- the- LoggingHandler.Level.
- category- the logging category.
- function- the function to evaluate logger message at runtime
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
logpublic 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- the- LoggingHandler.Level.
- category- the logging category.
- logExpression- the- Expressionto evaluate logger message at runtime against the request- Message.
- Returns:
- the current BaseIntegrationFlowDefinition.
- See Also:
 
- 
scatterGatherPopulate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function and defaultAggregatorSpecfor gathering function.- Parameters:
- scatterChannel- the- MessageChannelfor scatting requests.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
scatterGatherPopulate aScatterGatherHandlerto the current integration flow position based on the providedMessageChannelfor scattering function andAggregatorSpecfor gathering function.- Parameters:
- scatterChannel- the- MessageChannelfor scatting requests.
- gatherer- the- Consumerfor- AggregatorSpecto configure gatherer. Can be- null.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
scatterGatherpublic 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- the- MessageChannelfor scatting requests.
- gatherer- the- Consumerfor- AggregatorSpecto configure gatherer. Can be- null.
- scatterGather- the- Consumerfor- ScatterGatherSpecto configure- ScatterGatherHandlerand its endpoint. Can be- null.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
scatterGatherPopulate aScatterGatherHandlerto the current integration flow position based on the providedRecipientListRouterSpecfor scattering function and defaultAggregatorSpecfor gathering function.- Parameters:
- scatterer- the- Consumerfor- RecipientListRouterSpecto configure scatterer.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
scatterGatherpublic 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- the- Consumerfor- RecipientListRouterSpecto configure scatterer. Can be- null.
- gatherer- the- Consumerfor- AggregatorSpecto configure gatherer. Can be- null.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
scatterGatherpublic 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- the- Consumerfor- RecipientListRouterSpecto configure scatterer.
- gatherer- the- Consumerfor- AggregatorSpecto configure gatherer.
- scatterGather- the- Consumerfor- ScatterGatherSpecto configure- ScatterGatherHandlerand its endpoint. Can be- null.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
barrierPopulate aBarrierMessageHandlerinstance for provided timeout.- Parameters:
- timeout- the timeout in milliseconds.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
barrierPopulate aBarrierMessageHandlerinstance for provided timeout and options fromBarrierSpecand endpoint options fromGenericEndpointSpec.- Parameters:
- timeout- the timeout in milliseconds.
- barrierConfigurer- the- Consumerto provide- BarrierMessageHandleroptions.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
triggerPopulate aServiceActivatingHandlerinstance to performMessageTriggerAction.- Parameters:
- triggerActionId- the- MessageTriggerActionbean id.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
triggerpublic B trigger(String triggerActionId, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.- Parameters:
- triggerActionId- the- MessageTriggerActionbean id.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
triggerPopulate aServiceActivatingHandlerinstance to performMessageTriggerAction.- Parameters:
- triggerAction- the- MessageTriggerAction.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
triggerpublic B trigger(MessageTriggerAction triggerAction, @Nullable Consumer<GenericEndpointSpec<ServiceActivatingHandler>> endpointConfigurer) Populate aServiceActivatingHandlerinstance to performMessageTriggerActionand endpoint options fromGenericEndpointSpec.- Parameters:
- triggerAction- the- MessageTriggerAction.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
interceptAdd one or moreChannelInterceptorimplementations to the currentcurrentMessageChannel, in the given order, after any interceptors already registered.- Parameters:
- interceptorArray- one or more- ChannelInterceptors.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Throws:
- IllegalArgumentException- if one or more null arguments are provided
- Since:
- 5.3
 
- 
fluxTransformpublic <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- the- Functionto process data reactive manner.
- Returns:
- the current BaseIntegrationFlowDefinition.
 
- 
nullChannelAdd a "nullChannel" bean into this flow definition as a terminal operator.- Returns:
- The IntegrationFlowinstance based on this definition.
- Since:
- 5.1
 
- 
handleReactivepublic <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- the- MessageHandlertype.
- Parameters:
- messageHandlerSpec- the- MessageHandlerSpecto configure the protocol specific- MessageHandler.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 6.1
 
- 
handleReactivepublic <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- the- MessageHandlertype.
- Parameters:
- messageHandlerSpec- the- MessageHandlerSpecto configure the protocol specific- MessageHandler.
- endpointConfigurer- the- Consumerto provide integration endpoint options.
- Returns:
- the current BaseIntegrationFlowDefinition.
- Since:
- 6.1
 
- 
handleReactiveAdd aReactiveMessageHandleras a terminalIntegrationFlowoperator.- Parameters:
- reactiveMessageHandler- the- ReactiveMessageHandlerto finish the flow.
- Returns:
- The IntegrationFlowinstance based on this definition.
- Since:
- 6.1
 
- 
handleReactivepublic IntegrationFlow handleReactive(ReactiveMessageHandler reactiveMessageHandler, @Nullable Consumer<GenericEndpointSpec<ReactiveMessageHandlerAdapter>> endpointConfigurer) Add aReactiveMessageHandleras a terminalIntegrationFlowoperator.- Parameters:
- reactiveMessageHandler- the- ReactiveMessageHandlerto finish the flow.
- endpointConfigurer- the- Consumerto configure a target endpoint for the handler.
- Returns:
- The IntegrationFlowinstance based on this definition.
- Since:
- 6.1
 
- 
toFinish this flow with delegation to otherIntegrationFlowinstance.- Parameters:
- other- the- IntegrationFlowto compose with.
- Returns:
- The IntegrationFlowinstance based on this definition.
- Since:
- 5.5.4
 
- 
toReactivePublisherRepresent an Integration Flow as a Reactive StreamsPublisherbean.- Type Parameters:
- T- the expected- payloadtype
- Returns:
- the Reactive Streams Publisher
 
- 
toReactivePublisherprotected <T> org.reactivestreams.Publisher<Message<T>> toReactivePublisher(boolean autoStartOnSubscribe) Represent an Integration Flow as a Reactive StreamsPublisherbean.- Type Parameters:
- T- the expected- payloadtype
- 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
 
- 
registerprotected <S extends ConsumerEndpointSpec<? super S,? extends MessageHandler>> B register(S endpointSpec, @Nullable Consumer<? super S> endpointConfigurer) 
- 
registerOutputChannelIfCan
- 
isOutputChannelRequiredprotected boolean isOutputChannelRequired()
- 
_this
- 
get
- 
checkReuse
- 
extractProxyTarget
 
- 
delay(Consumer)