Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
ProcessorFactoryAvailable as of Camel 2.4 There is a ExampleHere is a custom factory which will alter the processor definitions. Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
The unit test and route is as follows: Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Now the idea is that the Notice we just return Java DSLIn Java DSL all you need to do is to configure the custom factory on the CamelContext using the Configuring ProcessorFactory in Java CamelContext context ... context.setProcessorFactory(new MyFactory()); Spring XMLIn Spring XML all you have to do is just to declare a <bean> tag with the custom factory, and Camel will automatic lookup it up and use it. Error rendering macro 'code': Invalid value specified for parameter 'java.lang.NullPointerException'<!-- use a custom processor factory as a hook which can manipulate the model before the processors is created, which allows us to do stuff to the route before its created --> <bean id="customFactory" class="org.apache.camel.processor.CustomProcessorFactoryTest$MyFactory"/> <camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- a simple route --> <route> <from uri="direct:start"/> <setBody> <constant>body not altered</constant> </setBody> <to uri="mock:foo"/> </route> <!-- a route which has a sub route (the split) --> <route> <from uri="direct:foo"/> <split> <simple>${body}</simple> <setBody> <constant>body not altered</constant> </setBody> <to uri="mock:split"/> </split> <to uri="mock:result"/> </route> </camelContext> |