Created
July 3, 2023 16:58
-
-
Save hguerrero/7757de49e4eb3f8c96e3e3756ddf02f9 to your computer and use it in GitHub Desktop.
Camel JBang JS DSL + Java Classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cat { | |
private final String name; | |
public Cat(String name) { | |
this.name = name; | |
} | |
public String getName() { | |
return name; | |
} | |
public String say() { | |
return name + " mjaus"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// camel-k: language=js | |
// Write your routes here, for example: | |
from("timer:cat2dog?period={{time:5000}}").routeId("cat2dog") | |
.setBody(e => new Cat("Snoopy")) | |
.log("${body.say()}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment