org.apache.camel.example.spring.javaconfig
Class MyRouteConfig

java.lang.Object
  extended by org.apache.camel.spring.javaconfig.CamelConfiguration
      extended by org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration
          extended by org.apache.camel.example.spring.javaconfig.MyRouteConfig
All Implemented Interfaces:
BeanFactoryAware, InitializingBean, ApplicationContextAware, org.springframework.osgi.context.BundleContextAware

@Configuration
public class MyRouteConfig
extends SingleRouteCamelConfiguration
implements 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:
$Revision: 17117 $

Nested Class Summary
static class MyRouteConfig.SomeBean
           
 
Constructor Summary
MyRouteConfig()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  CamelContext createCamelContext()
          Returns the CamelContext which support OSGi
 org.osgi.framework.BundleContext getBundleContext()
           
static void main(String[] args)
          Allow this route to be run as an application
 RouteBuilder route()
          Creates the single RouteBuilder to use in this configuration
 void setBundleContext(org.osgi.framework.BundleContext bundleContext)
           
protected  void setupCamelContext(CamelContext camelContext)
           
 
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
 

Constructor Detail

MyRouteConfig

public MyRouteConfig()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Allow this route to be run as an application

Parameters:
args -
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 CamelContext createCamelContext()
                                   throws Exception
Returns the CamelContext which support OSGi

Overrides:
createCamelContext in class CamelConfiguration
Throws:
Exception

setupCamelContext

protected void setupCamelContext(CamelContext camelContext)
                          throws Exception
Overrides:
setupCamelContext in class CamelConfiguration
Throws:
Exception

route

@Bean
public RouteBuilder route()
Description copied from class: SingleRouteCamelConfiguration
Creates the single RouteBuilder to use in this configuration

Specified by:
route in class SingleRouteCamelConfiguration

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.