org.apache.camel.spring
Class CamelBeanPostProcessor
java.lang.Object
   org.apache.camel.spring.CamelBeanPostProcessor
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 implicitly installed and configured for you. So you should never have to
 explicitly create or configure one of these instances.
- Version:
 
| Method Summary | 
| protected  boolean | canPostProcessBean(Object bean,
                                     String beanName)Can we post process the given bean?
 | 
| protected  boolean | canSetCamelContext(Object bean,
                                     String beanName)
 | 
|  org.apache.camel.CamelContext | getCamelContext()
 | 
|  String | getCamelId()
 | 
| protected  org.apache.camel.CamelContext | getOrLookupCamelContext()
 | 
|  org.apache.camel.impl.CamelPostProcessorHelper | getPostProcessor()
 | 
| protected  void | injectField(Field field,
                       String endpointUri,
                       String endpointRef,
                       Object bean,
                       String beanName)
 | 
| protected  void | injectFields(Object bean,
                         String beanName)A strategy method to allow implementations to perform some custom JBI
 based injection of the POJO
 | 
| protected  void | injectMethods(Object bean,
                           String beanName)
 | 
|  Object | postProcessAfterInitialization(Object bean,
                                                             String beanName)
 | 
|  Object | postProcessBeforeInitialization(Object bean,
                                                               String beanName)
 | 
|  void | setApplicationContext(ApplicationContext applicationContext)
 | 
|  void | setCamelContext(org.apache.camel.CamelContext camelContext)
 | 
|  void | setCamelId(String camelId)
 | 
| protected  void | setterInjection(Method method,
                               Object bean,
                               String beanName)
 | 
| protected  void | setterInjection(Method method,
                               Object bean,
                               String beanName,
                               String endpointUri,
                               String endpointRef)
 | 
 
| 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:
- postProcessBeforeInitializationin interface- BeanPostProcessor
 
- 
- Throws:
- BeansException
 
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean,
                                             String beanName)
                                      throws BeansException
- 
- Specified by:
- postProcessAfterInitializationin interface- BeanPostProcessor
 
- 
- Throws:
- BeansException
 
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
- 
- Specified by:
- setApplicationContextin interface- ApplicationContextAware
 
- 
- Throws:
- BeansException
 
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- 
 
- 
 
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- 
 
- 
 
getCamelId
public String getCamelId()
- 
 
- 
 
setCamelId
public void setCamelId(String camelId)
- 
 
- 
 
canPostProcessBean
protected boolean canPostProcessBean(Object bean,
                                     String beanName)
- Can we post process the given bean?
 
- 
 
- 
- Parameters:
- bean- the bean
- beanName- the bean name
- Returns:
- true to process it
 
canSetCamelContext
protected boolean canSetCamelContext(Object bean,
                                     String beanName)
- 
 
- 
 
injectFields
protected void injectFields(Object bean,
                            String beanName)
- 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,
                           String beanName)
- 
 
- 
 
injectMethods
protected void injectMethods(Object bean,
                             String beanName)
- 
 
- 
 
setterInjection
protected void setterInjection(Method method,
                               Object bean,
                               String beanName)
- 
 
- 
 
setterInjection
protected void setterInjection(Method method,
                               Object bean,
                               String beanName,
                               String endpointUri,
                               String endpointRef)
- 
 
- 
 
getOrLookupCamelContext
protected org.apache.camel.CamelContext getOrLookupCamelContext()
- 
 
- 
 
getPostProcessor
public org.apache.camel.impl.CamelPostProcessorHelper getPostProcessor()
- 
 
- 
 
Apache CAMEL