Apache Camel
1 import org.apache.camel.CamelContext;
2 import org.apache.camel.builder.RouteBuilder;
3 import org.apache.camel.impl.DefaultCamelContext;
4
5
6 public class FileMoveWithCamel {
7 public static void main(String args[]) throws Exception {
8 CamelContext context = new DefaultCamelContext();
9 context.addRoutes(new RouteBuilder() {
10 public void configure() {
11 //from("file:d:/temp/inbox?noop=true").to("file:d:/temp/outbox");
12 from("file:d:/test/inbox/?delay=30000").to("file:d:/test/outbox");
13 }
14 });
15 context.start();
16 boolean loop =true;
17 while(loop){
18 Thread.sleep(25000);
19 }
20 context.stop();
21 }
22 }