On Wed, Apr 6, 2011 at 4:24 PM, jpalmer1026 <palmer1...@gmail.com> wrote:
> Hi Claus,
>
> Thanks for the information. This is getting me a little closer but it still
> doesn't solve my particular use case. What I'm actually trying to do is
> route files based on filename. The filenames will be read in from an
> external file upon the launch of the app and this filename list will then be
> used to conditionally route the files. For example, if the initial list of
> filenames that was read in is test10.txt, test20.txt and test30.txt, then
> the filter would need to route any files with any of those filenames to one
> directory and all other files to a different directory.
>
> Does that make sense? Is there a way to do this with Camel?
>

Just implement a custom filter class and configure it on the endpoint

file:xxx?filter=#myFilter

<bean id="myFilter" class="...MyFilterBean">

And then implement the interface
org.apache.camel.component.file.GenericFileFilter in MyFilterBean.
And return true|false to accept the file or not.



> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Route-Question-tp4281861p4286385.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to