You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/12/16 17:26:05 UTC

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #549: Add initial support for kotlin

ppalaga commented on a change in pull request #549: Add initial support for kotlin
URL: https://github.com/apache/camel-quarkus/pull/549#discussion_r358364554
 
 

 ##########
 File path: extensions/kotlin/runtime/src/main/kotlin/org/apache/camel/quarkus/kotlin/RoutesDSL.kt
 ##########
 @@ -14,14 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.acme.timer
+package org.apache.camel.quarkus.kotlin
 
+import org.apache.camel.RoutesBuilder
 import org.apache.camel.builder.RouteBuilder
 
-class TimerRoute: RouteBuilder() {
-    override fun configure() {
-        from("timer:foo?period=1s")
-                .process { e -> e.message.body = "Hello from Kotlin!" }
-                .log("\${body}")
+fun routes(block: RouteBuilder.() -> Unit) : RoutesBuilder {
 
 Review comment:
   Could you please add a piece of KDoc explaining what is the code in this file supposed to do?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services