サンプルコード (FileToFileのCamelサンプル) | 2012-03-13 17:34 |
documents (OSC2015沖縄セミナー資料) | 2015-07-09 11:48 |
/** * */ package httpget; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.main.Main; /** * @author daikuro * */ public class MyMain { /** * @param args */ public static void main(String[] args) throws Exception{ Main camel = new Main(); camel.addRouteBuilder(route); camel.run(); } public static RouteBuilder route = new RouteBuilder() { @Override public void configure() throws Exception { from("timer:httpget?repeatCount=1") // 1回だけ実行 .to("http4://www.yahoo.co.jp") .to("log:end"); } }; }