简体   繁体   English

Apache camel FTP我们如何才能知道所有文件都是从FTP URL下载的

[英]Apache camel FTP how can we know that all the files are downloaded from the FTP URL

Currently am working with Apache Camel FTP, How to know that all the folders of the accessed FTP URL are downloaded successfully? 当前正在使用Apache Camel FTP,如何知道已成功访问FTP URL的所有文件夹? As I have all zip files on the FTP URL to download, I want to unzip them once the download is complete, but am not understanding when to unzip them as I don't know the downloading of all the .zip files is completed. 由于我在FTP URL上可以下载所有zip文件,因此我想在下载完成后解压缩它们,但是由于我不知道所有.zip文件的下载已完成,所以我不知道何时解压缩它们。

Got Answer!! 得到答案!

      from("{{ftp.server}}")
        .to("file:target/download")
        .log("Downloaded file ${file:name} complete.")
          .process(new Processor() {
            public void process(Exchange exchange) throws Exception {
             boolean isComplete  = (Boolean)exchange.getProperties().get("CamelBatchComplete");
             });

isComplete will return you true else false, if all the files are downloaded/consumed. 如果所有文件都已下载/使用,则isComplete将返回true,否则返回false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM