103.18. ディレクトリーから読み取り、Java でメッセージを処理する

from("file://inputdir/").process(new Processor() {
  public void process(Exchange exchange) throws Exception {
    Object body = exchange.getIn().getBody();
    // do some business logic with the input body
  }
});

本体は、inputdir ディレクトリーにドロップされたばかりのファイルを指す File オブジェクトになります。