@Configuration public abstract class CamelConfiguration extends Object implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.ApplicationContextAware
routes()
method is overridden, this configuration
automatically load all the RouteBuilder
instances available in the Spring context.Constructor and Description |
---|
CamelConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.spring.CamelBeanPostProcessor |
camelBeanPostProcessor() |
org.apache.camel.CamelContext |
camelContext()
Get's the
CamelContext to be used. |
org.apache.camel.ConsumerTemplate |
consumerTemplate(org.apache.camel.CamelContext camelContext)
Get's the
ConsumerTemplate to be used. |
protected org.apache.camel.CamelContext |
createCamelContext()
Factory method returning
CamelContext used by this configuration. |
protected org.springframework.context.ApplicationContext |
getApplicationContext() |
<T> T |
getBean(Class<T> type) |
Object |
getBean(String beanName) |
<T> T |
getBean(String beanName,
Class<T> type) |
protected org.springframework.beans.factory.BeanFactory |
getBeanFactory() |
protected <T> T |
getConfigured(T object)
Invoke callbacks on the object, as though it were configured in the factory.
|
org.apache.camel.ProducerTemplate |
producerTemplate(org.apache.camel.CamelContext camelContext)
Get's the
ProducerTemplate to be used. |
List<org.apache.camel.builder.RouteBuilder> |
routes()
Returns the list of routes to use in this configuration.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext ac) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
protected void |
setupCamelContext(org.apache.camel.CamelContext camelContext)
Callback to setup
CamelContext before its started |
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
protected org.springframework.beans.factory.BeanFactory getBeanFactory()
public void setApplicationContext(org.springframework.context.ApplicationContext ac)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
protected org.springframework.context.ApplicationContext getApplicationContext()
public <T> T getBean(Class<T> type)
protected <T> T getConfigured(T object)
object
- object to configure@Bean(initMethod="", destroyMethod="") public org.apache.camel.ProducerTemplate producerTemplate(org.apache.camel.CamelContext camelContext) throws Exception
ProducerTemplate
to be used.Exception
@Bean(initMethod="", destroyMethod="") public org.apache.camel.ConsumerTemplate consumerTemplate(org.apache.camel.CamelContext camelContext) throws Exception
ConsumerTemplate
to be used.Exception
@Bean public org.apache.camel.spring.CamelBeanPostProcessor camelBeanPostProcessor() throws Exception
Exception
@Bean public org.apache.camel.CamelContext camelContext() throws Exception
CamelContext
to be used.Exception
protected void setupCamelContext(org.apache.camel.CamelContext camelContext) throws Exception
CamelContext
before its startedException
protected org.apache.camel.CamelContext createCamelContext() throws Exception
CamelContext
used by this configuration.CamelContext
used by this configuration. By default SpringCamelContext
instance is
created, to fully integrate Spring application context and Camel registry.Exception
public List<org.apache.camel.builder.RouteBuilder> routes()
RouteBuilder
instances available in the
ApplicationContext
.Apache Camel