Class FunctionFlowBuilder
java.lang.Object
org.springframework.cloud.function.integration.dsl.FunctionFlowBuilder
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 Summary
ConstructorsConstructorDescriptionFunctionFlowBuilder(org.springframework.cloud.function.context.FunctionCatalog functionCatalog) -
Method Summary
Modifier and TypeMethodDescriptionfrom(Class<?> serviceInterface, Consumer<org.springframework.integration.dsl.GatewayProxySpec> endpointConfigurer) from(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> publisher) from(org.springframework.integration.core.MessageSource<?> messageSource) from(org.springframework.integration.core.MessageSource<?> messageSource, Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer) from(org.springframework.integration.dsl.MessageChannelSpec<?, ?> messageChannelSpec) from(org.springframework.integration.dsl.MessageProducerSpec<?, ?> messageProducerSpec) from(org.springframework.integration.dsl.MessageSourceSpec<?, ? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec) from(org.springframework.integration.dsl.MessageSourceSpec<?, ? extends org.springframework.integration.core.MessageSource<?>> messageSourceSpec, Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer) from(org.springframework.integration.dsl.MessagingGatewaySpec<?, ?> inboundGatewaySpec) from(org.springframework.integration.endpoint.MessageProducerSupport messageProducer) from(org.springframework.integration.gateway.MessagingGatewaySupport inboundGateway) from(org.springframework.messaging.MessageChannel messageChannel) fromSupplier(String supplierDefinition) fromSupplier(String supplierDefinition, Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer) fromSupplier(Supplier<T> messageSource) fromSupplier(Supplier<T> messageSource, Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer)
-
Constructor Details
-
FunctionFlowBuilder
public FunctionFlowBuilder(org.springframework.cloud.function.context.FunctionCatalog functionCatalog)
-
-
Method Details
-
fromSupplier
-
fromSupplier
public FunctionFlowDefinition fromSupplier(String supplierDefinition, @Nullable Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer) -
fromSupplier
-
fromSupplier
public <T> FunctionFlowDefinition fromSupplier(Supplier<T> messageSource, @Nullable Consumer<org.springframework.integration.dsl.SourcePollingChannelAdapterSpec> endpointConfigurer) -
from
-
from
-
from
-
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
-
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)
-