Once a file poller endpoint is initialized, you can not change target directory that the file poller will poll the files from.
Have you tried with "filter" properties of the file poller to selectively poll files from designated directory based on filter criteria?
Thanks, that's actually an idea.
It depends on how "powerful" this filter is. To be specific in my case, i am waiting for a xml file to be deleted (in a subdirectory sub1) to poll another xml file (in a subdirectory sub2).
I have plenty (and the number is dynamic at runtime) of these subdirectories like this:
I think if the filter allows me to put a condition (like no xml in subdir1) and this name in subdir2 with relative path it should be alright.
Is that possible?
You can implement you own class that implements the java.io.FileFilter where you can determine which files to include or not.
As you get hold of the java.io.File object you have all the information about absolute paths, name, parent directory etc.
So you are advising to create a POJO implementing the logic I need. It is definately a possibility, but I was looking for a more "standard way" of doing things... re-use existing components.