Reputation: 109
Is there a way to inject the route into camel FileFilter ? I have this camel route :
<route id="mislaka-bituch">
<from
uri="ftp://{{mislaka_bituch_in_path}}?filter=#fileFilter&readLock=none&delete=true&moveFailed=.error&sortBy=file:modified" />
<convertBodyTo type="java.lang.String" />
<to uri="bean:redirectService?method=analyzeMislaka" />
<toD uri="ftp://${exchangeProperty[targetPath]}" />
</route>
And in my FileFilter I have the method :
public boolean accept(GenericFile<T> file)
But how do i get the route info (name for example) in this class ?
Upvotes: 0
Views: 300
Reputation: 55750
Yes as said in the comments, you cannot get the id of the route etc, in the FileFilter
method, you can only get file information from the GenericFile
.
Upvotes: 1