You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/kotlin-dsl.adoc
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[[kotlin-dsl]]
2
2
== Kotlin DSL
3
3
4
-
The Kotlin DSL is a wrapper and extension to <<./dsl.adoc#java-dsl,Java DSL>> and aimed to make Spring Integration development on Kotlin as smooth and straightforward as is it possible with interoperability with existing Java API and Kotlin language-specific structures.
4
+
The Kotlin DSL is a wrapper and extension to <<./dsl.adoc#java-dsl,Java DSL>> and aimed to make Spring Integration development on Kotlin as smooth and straightforward as possible with interoperability with the existing Java API and Kotlin language-specific structures.
5
5
6
6
All you need to get started is just an import for `org.springframework.integration.dsl.integrationFlow` - an overloaded global function for Kotlin DSL.
7
7
@@ -41,7 +41,7 @@ Such a global `integrationFlow()` function expects a lambda in builder style for
41
41
See more overloaded `integrationFlow()` variants below.
42
42
43
43
Many other scenarios require an `IntegrationFlow` to be started from source of data (e.g. `JdbcPollingChannelAdapter`, `JmsInboundGateway` or just an existing `MessageChannel`).
44
-
For this purposeSpring Integration Java DSL provides an `IntegrationFlows` factory with its bunch of overloaded `from()` methods.
44
+
For this purpose, the Spring Integration Java DSL provides an `IntegrationFlows` factory with its large number of overloaded `from()` methods.
45
45
This factory can be used in Kotlin as well:
46
46
47
47
====
@@ -56,8 +56,8 @@ fun flowFromSupplier() =
56
56
====
57
57
58
58
But unfortunately not all `from()` methods are compatible with Kotlin structures.
59
-
To fix a gap, this project provides a Kotlin DSL around an `IntegrationFlows` factory.
60
-
It is done as a set of overloaded `integrationFlow()` functions.
59
+
To fix the gap, this project provides a Kotlin DSL around an `IntegrationFlows` factory.
60
+
It is implemented as a set of overloaded `integrationFlow()` functions.
61
61
With a consumer for a `KotlinIntegrationFlowDefinition` to declare the rest of the flow as an `IntegrationFlow` lambda to reuse the mentioned above experience and also avoid `get()` call in the end.
62
62
For example:
63
63
@@ -79,7 +79,7 @@ fun messageSourceFlow() =
79
79
----
80
80
====
81
81
82
-
In addition Kotlin extensions are provided for Java DSL API which needs some refinement for Kotlin structures.
82
+
In addition, Kotlin extensions are provided for the Java DSL API which needs some refinement for Kotlin structures.
83
83
For example `IntegrationFlowDefinition<*>` requires a reifying for many methods with `Class<P>` argument:
0 commit comments