Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
package org.nsinfra.camel;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
public class JavaDSLMain extends RouteBuilder {
* {@link RouteBuilder#configure()}
* Specifies route definition
public void configure() throws Exception {
.choice().when(xpath("/order/product = 'gadget'"))
public static void main(String[] args) throws Exception {
CamelContext camelContext = new DefaultCamelContext();
camelContext.addRoutes(new JavaDSLMain());
/* wait indefinitely */
Object obj = new Object();
synchronized (obj) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment