org.apache.camel.example.spring.javaconfig
Class MyRouteConfig
java.lang.Object
org.apache.camel.spring.javaconfig.CamelConfiguration
org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration
org.apache.camel.example.spring.javaconfig.MyRouteConfig
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.osgi.context.BundleContextAware
@Configuration
public class MyRouteConfig
- extends org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration
- implements org.springframework.beans.factory.InitializingBean, org.springframework.osgi.context.BundleContextAware
A simple example router from a file system to an ActiveMQ queue and then to a file system
- Version:
| Methods inherited from class org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration |
routes |
| Methods inherited from class org.apache.camel.spring.javaconfig.CamelConfiguration |
camelBeanPostProcessor, camelContext, getApplicationContext, getBean, getBean, getBean, getBeanFactory, getConfigured, setApplicationContext, setBeanFactory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyRouteConfig
public MyRouteConfig()
main
public static void main(String[] args)
throws Exception
- Allow this route to be run as an application
- Throws:
Exception
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
- Specified by:
setBundleContext in interface org.springframework.osgi.context.BundleContextAware
createCamelContext
protected org.apache.camel.CamelContext createCamelContext()
throws Exception
- Returns the CamelContext which support OSGi
- Overrides:
createCamelContext in class org.apache.camel.spring.javaconfig.CamelConfiguration
- Throws:
Exception
setupCamelContext
protected void setupCamelContext(org.apache.camel.CamelContext camelContext)
throws Exception
- Overrides:
setupCamelContext in class org.apache.camel.spring.javaconfig.CamelConfiguration
- Throws:
Exception
route
@Bean
public org.apache.camel.builder.RouteBuilder route()
- Specified by:
route in class org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
Apache CAMEL