Hey All,

I am trying to write processor class that can process files retrieved from
different routes. Originally It was designed to handle email routes but I
also want to handle sftp, ftp or local file routes. However I am finding
that the ftp files are not delivered as a Message like an email is.

Is there a way that I could handle all different route delivery types in a
single process method like this?


*Here is how the routes are setup*

        try{
            context.addRoutes(new RouteBuilder() {
                    public void configure() throws Exception{
                        from(route).process(new FileProcessor());
                    }
                });
        }


*Here is how I am processing files and messages delivered*

public class FileProcessor implements Processor {

        public void process(Exchange exchange) throws Exception {

               Map<String, DataHandler> attachments =
exchange.getIn().getAttachments();



-- 
Josiah Mangiameli

Software Developer
Urjanet Energy Solutions

*(770) 262 9306*

Reply via email to