Class IntegrationFlows
java.lang.Object
org.springframework.integration.dsl.IntegrationFlows
public final class IntegrationFlows extends Object
The central factory for fluent
IntegrationFlowBuilder API.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell, Oleg Zhurakousky
- See Also:
IntegrationFlowBeanPostProcessor
-
Method Summary
Modifier and Type Method Description static IntegrationFlowBuilderfrom(Class<?> serviceInterface)Populate theMessageChannelto the newIntegrationFlowBuilderchain, which becomes as arequestChannelfor the Messaging Gateway(s) built on the provided service interface.static IntegrationFlowBuilderfrom(Class<?> serviceInterface, Consumer<GatewayProxySpec> endpointConfigurer)Populate theMessageChannelto the newIntegrationFlowBuilderchain, which becomes as arequestChannelfor the Messaging Gateway(s) built on the provided service interface.static IntegrationFlowBuilderfrom(String messageChannelName)Populate theMessageChannelname to the newIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(String messageChannelName, boolean fixedSubscriber)Populate theMessageChannelname to the newIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(org.reactivestreams.Publisher<? extends Message<?>> publisher)Populate aFluxMessageChannelto theIntegrationFlowBuilderchain and subscribe it to the providedPublisher.static IntegrationFlowBuilderfrom(MessageSource<?> messageSource)Populate the providedMessageSourceobject to theIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(MessageSource<?> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)Populate the providedMessageSourceobject to theIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(IntegrationFlow other)Start the flow with a composition from theIntegrationFlow.static IntegrationFlowBuilderfrom(MessageChannelSpec<?,?> messageChannelSpec)Populate theMessageChannelobject to theIntegrationFlowBuilderchain using the fluent API fromMessageChannelSpec.static IntegrationFlowBuilderfrom(MessageProducerSpec<?,?> messageProducerSpec)Populate theMessageProducerSupportobject to theIntegrationFlowBuilderchain using the fluent API from theMessageProducerSpec.static IntegrationFlowBuilderfrom(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec)Populate theMessageSourceobject to theIntegrationFlowBuilderchain using the fluent API from the providedMessageSourceSpec.static IntegrationFlowBuilderfrom(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)Populate theMessageSourceobject to theIntegrationFlowBuilderchain using the fluent API from the providedMessageSourceSpec.static IntegrationFlowBuilderfrom(MessagingGatewaySpec<?,?> inboundGatewaySpec)Populate theMessagingGatewaySupportobject to theIntegrationFlowBuilderchain using the fluent API from theMessagingGatewaySpec.static IntegrationFlowBuilderfrom(MessageProducerSupport messageProducer)Populate the providedMessageProducerSupportobject to theIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(MessagingGatewaySupport inboundGateway)Populate the providedMessagingGatewaySupportobject to theIntegrationFlowBuilderchain.static IntegrationFlowBuilderfrom(MessageChannel messageChannel)Populate the providedMessageChannelobject to theIntegrationFlowBuilderchain.static <T> IntegrationFlowBuilderfromSupplier(Supplier<T> messageSource)ProvidesSupplieras source of messages to the integration flow which will be triggered by the application context's default poller (which must be declared).static <T> IntegrationFlowBuilderfromSupplier(Supplier<T> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)ProvidesSupplieras source of messages to the integration flow.
-
Method Details
-
from
Populate theMessageChannelname to the newIntegrationFlowBuilderchain. TheIntegrationFlowinputChannel.- Parameters:
messageChannelName- the name of existingMessageChannelbean. The newDirectChannelbean will be created on context startup if there is no bean with this name.- Returns:
- new
IntegrationFlowBuilder.
-
from
Populate theMessageChannelname to the newIntegrationFlowBuilderchain. Typically for theFixedSubscriberChanneltogether withfixedSubscriber = true. TheIntegrationFlowinputChannel.- Parameters:
messageChannelName- the name forDirectChannelorFixedSubscriberChannelto be created on context startup, not reference. TheMessageChanneldepends on thefixedSubscriberboolean argument.fixedSubscriber- the boolean flag to determine if resultMessageChannelshould beDirectChannel, iffalseorFixedSubscriberChannel, iftrue.- Returns:
- new
IntegrationFlowBuilder. - See Also:
DirectChannel,FixedSubscriberChannel
-
from
Populate theMessageChannelobject to theIntegrationFlowBuilderchain using the fluent API fromMessageChannelSpec. TheIntegrationFlowinputChannel.- Parameters:
messageChannelSpec- the MessageChannelSpec to populateMessageChannelinstance.- Returns:
- new
IntegrationFlowBuilder. - See Also:
MessageChannels
-
from
Populate the providedMessageChannelobject to theIntegrationFlowBuilderchain. TheIntegrationFlowinputChannel.- Parameters:
messageChannel- theMessageChannelto populate.- Returns:
- new
IntegrationFlowBuilder.
-
from
public static IntegrationFlowBuilder from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec)Populate theMessageSourceobject to theIntegrationFlowBuilderchain using the fluent API from the providedMessageSourceSpec. TheIntegrationFlowstartMessageSource.- Parameters:
messageSourceSpec- theMessageSourceSpecto use.- Returns:
- new
IntegrationFlowBuilder. - See Also:
and its implementations.
-
from
public static IntegrationFlowBuilder from(MessageSourceSpec<?,? extends MessageSource<?>> messageSourceSpec, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)Populate theMessageSourceobject to theIntegrationFlowBuilderchain using the fluent API from the providedMessageSourceSpec. TheIntegrationFlowstartMessageSource.- Parameters:
messageSourceSpec- theMessageSourceSpecto use.endpointConfigurer- theConsumerto provide more options for theSourcePollingChannelAdapterFactoryBean.- Returns:
- new
IntegrationFlowBuilder. - See Also:
MessageSourceSpec,SourcePollingChannelAdapterSpec
-
fromSupplier
ProvidesSupplieras source of messages to the integration flow which will be triggered by the application context's default poller (which must be declared).- Type Parameters:
T- the supplier type.- Parameters:
messageSource- theSupplierto populate.- Returns:
- new
IntegrationFlowBuilder. - See Also:
Supplier
-
fromSupplier
public static <T> IntegrationFlowBuilder fromSupplier(Supplier<T> messageSource, Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)ProvidesSupplieras source of messages to the integration flow. which will be triggered by a providedSourcePollingChannelAdapter.- Type Parameters:
T- the supplier type.- Parameters:
messageSource- theSupplierto populate.endpointConfigurer- theConsumerto provide more options for theSourcePollingChannelAdapterFactoryBean.- Returns:
- new
IntegrationFlowBuilder. - See Also:
Supplier
-
from
Populate the providedMessageSourceobject to theIntegrationFlowBuilderchain. TheIntegrationFlowstartMessageSource.- Parameters:
messageSource- theMessageSourceto populate.- Returns:
- new
IntegrationFlowBuilder. - See Also:
MessageSource
-
from
public static IntegrationFlowBuilder from(MessageSource<?> messageSource, @Nullable Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer)Populate the providedMessageSourceobject to theIntegrationFlowBuilderchain. TheIntegrationFlowstartMessageSource. In addition useSourcePollingChannelAdapterSpecto provide options for the underlyingSourcePollingChannelAdapterendpoint.- Parameters:
messageSource- theMessageSourceto populate.endpointConfigurer- theConsumerto provide more options for theSourcePollingChannelAdapterFactoryBean.- Returns:
- new
IntegrationFlowBuilder. - See Also:
MessageSource,SourcePollingChannelAdapterSpec
-
from
Populate theMessageProducerSupportobject to theIntegrationFlowBuilderchain using the fluent API from theMessageProducerSpec. TheIntegrationFlowstartMessageProducer.- Parameters:
messageProducerSpec- theMessageProducerSpecto use.- Returns:
- new
IntegrationFlowBuilder. - See Also:
MessageProducerSpec
-
from
Populate the providedMessageProducerSupportobject to theIntegrationFlowBuilderchain. TheIntegrationFlowstartMessageProducer.- Parameters:
messageProducer- theMessageProducerSupportto populate.- Returns:
- new
IntegrationFlowBuilder.
-
from
Populate theMessagingGatewaySupportobject to theIntegrationFlowBuilderchain using the fluent API from theMessagingGatewaySpec. TheIntegrationFlowstartMessagingGateway.- Parameters:
inboundGatewaySpec- theMessagingGatewaySpecto use.- Returns:
- new
IntegrationFlowBuilder.
-
from
Populate the providedMessagingGatewaySupportobject to theIntegrationFlowBuilderchain. TheIntegrationFlowstartMessageProducer.- Parameters:
inboundGateway- theMessagingGatewaySupportto populate.- Returns:
- new
IntegrationFlowBuilder.
-
from
Populate theMessageChannelto the newIntegrationFlowBuilderchain, which becomes as arequestChannelfor the Messaging Gateway(s) built on the provided service interface.A gateway proxy bean for provided service interface is registered under a name from the
MessagingGateway.name()if present or from theIntegrationFlowbean name plus.gatewaysuffix.- Parameters:
serviceInterface- the service interface class with an optionalMessagingGatewayannotation.- Returns:
- new
IntegrationFlowBuilder.
-
from
public static IntegrationFlowBuilder from(Class<?> serviceInterface, @Nullable Consumer<GatewayProxySpec> endpointConfigurer)Populate theMessageChannelto the newIntegrationFlowBuilderchain, which becomes as arequestChannelfor the Messaging Gateway(s) built on the provided service interface.A gateway proxy bean for provided service interface is based on the options configured via provided
Consumer.- Parameters:
serviceInterface- the service interface class with an optionalMessagingGatewayannotation.endpointConfigurer- theConsumerto configure proxy bean for gateway.- Returns:
- new
IntegrationFlowBuilder. - Since:
- 5.2
-
from
public static IntegrationFlowBuilder from(org.reactivestreams.Publisher<? extends Message<?>> publisher)Populate aFluxMessageChannelto theIntegrationFlowBuilderchain and subscribe it to the providedPublisher.- Parameters:
publisher- thePublisherto subscribe to.- Returns:
- new
IntegrationFlowBuilder.
-
from
Start the flow with a composition from theIntegrationFlow.- Parameters:
other- theIntegrationFlowfrom which to compose.- Returns:
- new
IntegrationFlowBuilder. - Since:
- 5.5.4
-