Class FunctionFlowBuilder

java.lang.Object
org.springframework.cloud.function.integration.dsl.FunctionFlowBuilder

public class FunctionFlowBuilder extends Object
The entry point for starting a FunctionFlowDefinition. Requires a FunctionCatalog to lookup function instances by their names or definitions from respective operators.

In addition to standard IntegrationFlow from() overloaded methods (for convenience), this class introduces fromSupplier(String) factory methods to resolve the target Supplier by its name or function definition from the provided FunctionCatalog.

This class represents a DSL for functions composition via integration endpoints. Extra processing can be done in between functions by the regular IntegrationFlow operators:

 
 @Bean
 IntegrationFlow someFunctionFlow(FunctionFlowBuilder functionFlowBuilder) {
		return functionFlowBuilder
				.fromSupplier("timeSupplier")
				.apply("spelFunction")
				.log(LoggingHandler.Level.DEBUG, "some.log.category")
				.<String, String>transform(String::toUpperCase)
				.accept("fileConsumer");
 }
 
 
Since:
4.0.3
Author:
Artem Bilan
  • Constructor Details

    • FunctionFlowBuilder

      public FunctionFlowBuilder(org.springframework.cloud.function.context.FunctionCatalog functionCatalog)
  • Method Details

    • fromSupplier

      public FunctionFlowDefinition fromSupplier(String supplierDefinition)
    • fromSupplier

      public FunctionFlowDefinition fromSupplier(String supplierDefinition, @Nullable Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer)
    • fromSupplier

      public <T> FunctionFlowDefinition fromSupplier(Supplier<T> messageSource)
    • fromSupplier

      public <T> FunctionFlowDefinition fromSupplier(Supplier<T> messageSource, @Nullable Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer)
    • from

      public FunctionFlowDefinition from(org.springframework.messaging.MessageChannel messageChannel)
    • from

      public FunctionFlowDefinition from(String messageChannelName)
    • from

      public FunctionFlowDefinition from(String messageChannelName, boolean fixedSubscriber)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.dsl.MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec, Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.core.MessageSource<?> messageSource)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.core.MessageSource<?> messageSource, @Nullable Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.endpoint.MessageProducerSupport messageProducer)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.gateway.MessagingGatewaySupport inboundGateway)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.dsl.MessageChannelSpec<?,?> messageChannelSpec)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.dsl.MessageProducerSpec<?,?> messageProducerSpec)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.dsl.MessageSourceSpec<?,? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec)
    • from

      public FunctionFlowDefinition from(org.springframework.integration.dsl.MessagingGatewaySpec<?,?> inboundGatewaySpec)
    • from

      public FunctionFlowDefinition from(Class<?> serviceInterface)
    • from

      public FunctionFlowDefinition from(Class<?> serviceInterface, @Nullable Consumer<org.springframework.integration.dsl.GatewayProxySpec> endpointConfigurer)
    • from

      public FunctionFlowDefinition from(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> publisher)