I wrote below code to FTP files from remote server. I need to do FTP only one
time and get all files from remote system. But with below code, I need to
specify how much time to wait before stopping the context. Is it possible to
specify stop only after all files FTP. 

{ 
    final CamelContext camelContext = new DefaultCamelContext(); 
    try { 
      camelContext.addRoutes( 
        new RouteBuilder() { 
            @Override 
            public void configure() throws Exception { 
                from("ftp://prodpsts1.com/TEST/fold?username=yam01&"; 
                        + "password=xxxxx"). 
                    to("file:C:\\personal\\input\\foldin"); 
            } 
        }); 
      camelContext.start(); 
      Thread.sleep(10000); 
      camelContext.stop(); 
    } catch (Exception exception) { 
        exception.printStackTrace(); 
   } 
}



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-stop-Camel-Context-after-all-files-FTP-tp5781342.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to