From 0297f6bc9fb36b89a7a0da723f8570e75e580279 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 8 Jul 2021 16:25:38 -0400 Subject: [PATCH] Fix dsl.adoc for the actual API around Supplier --- src/reference/asciidoc/dsl.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reference/asciidoc/dsl.adoc b/src/reference/asciidoc/dsl.adoc index d9917de206..715a36ba9e 100644 --- a/src/reference/asciidoc/dsl.adoc +++ b/src/reference/asciidoc/dsl.adoc @@ -38,7 +38,7 @@ public class MyConfiguration { @Bean public IntegrationFlow myFlow() { - return IntegrationFlows.from(integerSource::getAndIncrement, + return IntegrationFlows.fromSupplier(integerSource()::getAndIncrement, c -> c.poller(Pollers.fixedRate(100))) .channel("inputChannel") .filter((Integer p) -> p > 0) @@ -388,7 +388,7 @@ public IntegrationFlow pollingFlow() { ---- ==== -For those cases that have no requirements to build `Message` objects directly, you can use the `IntegrationFlows.from()` variant that is based on the `java.util.function.Supplier` . +For those cases that have no requirements to build `Message` objects directly, you can use a `IntegrationFlows.fromSupplier()` variant that is based on the `java.util.function.Supplier` . The result of the `Supplier.get()` is automatically wrapped in a `Message` (if it is not already a `Message`). [[java-dsl-routers]]