My requirement in my project to monitor a folder. Whenever a xml file gets added or xml file present in that folder gets updated i need to listen to those changes and parse the xml file to get the message. Do you have clue how we can approch that. I thought of using quartz but schedular will execute the job for every certain interval of time instead of executing the job whenever folder gets modified. Whether can we use joblistener or triggerlistener?
Assuming you can be happy with "reasonably quick" notification, say once a minute, its easy.
Better approach is to have a daemon thread sleep, look for file, and if its there, immediately rename it to another directory.
Then release semaphore or other sync technique, to have the "worker" thread do the processing while the "checking" thread takes a nap and does the next lookup.