Fix README for the current state of code base

* Update Copyright in the affected classes
This commit is contained in:
Artem Bilan
2020-01-03 14:28:22 -05:00
parent d4c0cf0170
commit c856c72fc6
4 changed files with 12 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ NOTE: The project should be treated as experimental and API is a subject to chan
The main goal we pursue here is to make Spring Integration development on Kotlin as smooth and straightforward as is it possible with interoperability with existing Java DSL and some Kotlin extensions or language-specific structures.
All you need to get started is just an import for `org.springframework.integration.dsl.integrationFlow` - an overloaded global function for Kotlin DSL.
All you need to get started is just an import for `org.springframework.integration.dsl.kotlin.integrationFlow` - an overloaded global function for Kotlin DSL.
For `IntegrationFlow` definitions as lambdas we typically don't need anything else from Kotlin and just declare a bean like this:
@@ -31,17 +31,16 @@ As an alternative to the construction above and for consistency with use-cases e
@Bean
fun flowLambda() =
integrationFlow {
filter<String>({ it === "test" })
wireTap(
integrationFlow {
handle { m -> println(m.payload) }
})
filter<String> { it === "test" }
wireTap {
handle { println(it.payload) }
}
transform<String, String> { it.toUpperCase() }
}
----
====
Such a global `integrationFlow()` function expects a `@BuilderInference` for a `KotlinIntegrationFlowDefinition` (a Kotlin extension for the `BaseIntegrationFlowDefinition` with some inline function for reified generic types) and produces a regular `IntegrationFlow` lambda implementation.
Such a global `integrationFlow()` function expects a lambda in builder style for a `KotlinIntegrationFlowDefinition` (a Kotlin wrapper for the `IntegrationFlowDefinition`) and produces a regular `IntegrationFlow` lambda implementation.
See more overloaded `integrationFlow()` variants below.
Many other scenarios require an `IntegrationFlow` to be started from source of data (e.g. `JdbcPollingChannelAdapter`, `JmsInboundGateway` or just an existing `MessageChannel`).
@@ -70,15 +69,15 @@ For example:
----
@Bean
fun functionFlow() =
integrationFlow<Function<String, String>>({ it.beanName("functionGateway") }) {
integrationFlow<Function<String, String>>({ beanName("functionGateway") }) {
transform<String, String> { it.toUpperCase() }
}
@Bean
fun messageSourceFlow() =
integrationFlow(MessageProcessorMessageSource { "testSource" },
{ it.poller { it.fixedDelay(10).maxMessagesPerPoll(1) } }) {
channel { c -> c.queue("fromSupplierQueue") }
{ poller { it.fixedDelay(10).maxMessagesPerPoll(1) } }) {
channel { queue("fromSupplierQueue") }
}
----
====

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.