camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Kettelerij <>
Subject Re: How to handle firefox outputting files, as component?
Date Fri, 01 Oct 2010 00:11:30 GMT

A Camel component is essentially a processor. In general components are more
suitable for reusable pieces of integration logic (like wrapping transports
such as ftp, tcp, ws, etc) while processors are more suitable for adhoc
tasks that you want to perform as part of your route (like validating the
payload of a message or some custom transformation). 

The question to ask whether you should build a component or a processor is:
do you want to (re)use the Firefox PDF functionality in other, possibly
future, routes? If so, you're probably beter of writing a component since it
allows for better encapsulation of the pdf-to-html conversion logic. Most
notably because the component has a well defined interface as illustrated in
your example ("firefoxpdf:///usr/bin/firefox").

But remember, writing a component is a bit more work than writing a
processor (e.g. more interfaces to implement). If your pdf-to-html
conversion is specific to some route a processor such as the one given below
will suffice.

from("file://myhtmlfiles").process(new Processor() {
      public void process(Exchange exchange) throws Exception {
             // classes are just for illustration
             Converter converter = new FirefoxConverter();
             Html html =

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message