org.apache.camel.spring
Class CamelBeanPostProcessor
java.lang.Object
org.apache.camel.spring.CamelBeanPostProcessor
- All Implemented Interfaces:
- BeanPostProcessor, ApplicationContextAware
public class CamelBeanPostProcessor
- extends Object
- implements BeanPostProcessor, ApplicationContextAware
A bean post processor which implements the Bean Integration
features in Camel. Features such as the Bean Injection of objects like
Endpoint and
ProducerTemplate together with support for
POJO Consuming via the
Consume annotation along with
POJO Producing via the
Produce annotation along with other annotations such as
RecipientList for creating a Recipient List router via annotations.
If you use the <camelContext> element in your Spring XML
then one of these bean post processors is implicity installed and configured for you. So you should never have to
explicitly create or configure one of these instances.
- Version:
- $Revision: 749562 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CamelBeanPostProcessor
public CamelBeanPostProcessor()
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean,
String beanName)
throws BeansException
- Specified by:
postProcessBeforeInitialization in interface BeanPostProcessor
- Throws:
BeansException
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws BeansException
- Specified by:
postProcessAfterInitialization in interface BeanPostProcessor
- Throws:
BeansException
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext in interface ApplicationContextAware
- Throws:
BeansException
getCamelContext
public CamelContext getCamelContext()
setCamelContext
public void setCamelContext(CamelContext camelContext)
injectFields
protected void injectFields(Object bean)
- A strategy method to allow implementations to perform some custom JBI
based injection of the POJO
- Parameters:
bean - the bean to be injected
injectField
protected void injectField(Field field,
String endpointUri,
String endpointRef,
Object bean)
injectMethods
protected void injectMethods(Object bean)
setterInjection
protected void setterInjection(Method method,
Object bean)
setterInjection
protected void setterInjection(Method method,
Object bean,
String endpointUri,
String endpointRef)
getPostProcessor
public CamelPostProcessorHelper getPostProcessor()
Copyright © 2009 Apache Software Foundation. All Rights Reserved.