You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by yamini <va...@yahoo.com> on 2016/04/14 22:04:10 UTC
How to stop Camel Context after all files FTP?
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-tp5781116.html
Sent from the Camel Development mailing list archive at Nabble.com.