Writing ComponentsApache Camel is designed to make it very easy to drop in new components whether they be routing components, transformers, transports etc. The idea of a component is to be a factory and manager of Endpoints. Here are the main steps to writing a component.
Users can then either explicitly create your component, configure it and register with a CamelContext Dependency injection and auto-discoveryWhen using auto-discovery the CamelContext will default to its Injector For example your component can depend on a JDBC DataSource or JMS ConnectionFactory which can be provided in the ApplicationContext in Spring or Module in Guice. So you can if you prefer configure your Component using an IoC framework like Spring or Guice; then add it to the CamelContext. Or you can let the Component auto-inject itself as the endpoints are auto-discovered. See Also |