I want to poll the directory to see if a new file has been added to the directory. If a new file is added, I want to read this file.
Can someone give me an idea how to do this?
If you use Java 7, you can use the file system monitoring service (a new feature in Java 7).
See the Oracle manual for instructions on how to use it.
( Java) , Apache Commons IO. org.apache.commons.io.monitor - .
org.apache.commons.io.monitor
jNotify ,
.
Apache Camel?
:
from("file://pollingfolder?delete=true").to("bean:handleOrder");
" ", bean- handleOrder. !
Spring-boot , Spring, Java.
: Apache Camel