Created
August 12, 2014 13:46
-
-
Save jmkgreen/ed271348de66646a87be to your computer and use it in GitHub Desktop.
Simplest Camel route ever
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.example.camel.test; | |
import org.apache.camel.CamelContext; | |
import org.apache.camel.builder.RouteBuilder; | |
import org.apache.camel.impl.DefaultCamelContext; | |
/** | |
* | |
*/ | |
public class CamelTest { | |
public static void main(String[] args) throws Exception { | |
CamelContext context = new DefaultCamelContext(); | |
context.addRoutes(new RouteBuilder() { | |
@Override | |
public void configure() throws Exception { | |
from("http4://www.google.com?initialDelay=0").log("found google") | |
.to("file:c:/google"); | |
} | |
}); | |
context.start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment