|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.spring.javaconfig.CamelConfiguration
@Configuration public abstract class CamelConfiguration
A useful base class for writing
Spring annotation-based configurations for working with Camel. Unless routes()
method is overridden, this configuration
automagically load all the RouteBuilder
instances available in the Spring context.
Constructor Summary | |
---|---|
CamelConfiguration()
|
Method Summary | ||
---|---|---|
org.apache.camel.spring.CamelBeanPostProcessor |
camelBeanPostProcessor()
|
|
org.apache.camel.CamelContext |
camelContext()
Returns the CamelContext |
|
protected org.apache.camel.CamelContext |
createCamelContext()
Factory method returning CamelContext used by this configuration. |
|
protected org.springframework.context.ApplicationContext |
getApplicationContext()
|
|
|
getBean(Class<T> type)
|
|
Object |
getBean(String beanName)
|
|
|
getBean(String beanName,
Class<T> type)
|
|
protected org.springframework.beans.factory.BeanFactory |
getBeanFactory()
|
|
protected
|
getConfigured(T object)
Invoke callbacks on the object, as though it were configured in the factory. |
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CamelConfiguration()
Method Detail |
---|
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 Object getBean(String beanName)
public <T> T getBean(Class<T> type)
public <T> T getBean(String beanName, Class<T> type)
protected <T> T getConfigured(T object)
object
- object to configure
@Bean public org.apache.camel.spring.CamelBeanPostProcessor camelBeanPostProcessor() throws Exception
Exception
@Bean public org.apache.camel.CamelContext camelContext() throws Exception
Exception
protected void setupCamelContext(org.apache.camel.CamelContext camelContext) throws Exception
Exception
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |