|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.impl.DefaultCamelBeanPostProcessor
public class DefaultCamelBeanPostProcessor
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
DynamicRouter
for creating a Dynamic router via annotations.
RecipientList
for creating a Recipient List router via annotations.
RoutingSlip
for creating a Routing Slip router via annotations.
Field Summary | |
---|---|
protected CamelContext |
camelContext
|
protected CamelPostProcessorHelper |
camelPostProcessorHelper
|
protected static org.slf4j.Logger |
LOG
|
Constructor Summary | |
---|---|
DefaultCamelBeanPostProcessor()
|
|
DefaultCamelBeanPostProcessor(CamelContext camelContext)
|
Method Summary | |
---|---|
protected boolean |
canPostProcessBean(Object bean,
String beanName)
|
protected boolean |
canSetCamelContext(Object bean,
String beanName)
|
CamelContext |
getOrLookupCamelContext()
Strategy to get the CamelContext to use. |
protected CamelPostProcessorHelper |
getPostProcessorHelper()
Strategy to get the CamelPostProcessorHelper |
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)
Apply this post processor to the given new bean instance after any bean initialization callbacks (like afterPropertiesSet
or a custom init-method). |
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
Apply this post processor to the given new bean instance before any bean initialization callbacks (like afterPropertiesSet
or a custom init-method). |
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 |
Field Detail |
---|
protected static final transient org.slf4j.Logger LOG
protected CamelPostProcessorHelper camelPostProcessorHelper
protected CamelContext camelContext
Constructor Detail |
---|
public DefaultCamelBeanPostProcessor()
public DefaultCamelBeanPostProcessor(CamelContext camelContext)
Method Detail |
---|
public Object postProcessBeforeInitialization(Object bean, String beanName) throws Exception
afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
bean
- the new bean instancebeanName
- the name of the bean
null
, no subsequent BeanPostProcessors will be invoked
Exception
- is thrown if error post processing beanpublic Object postProcessAfterInitialization(Object bean, String beanName) throws Exception
afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
bean
- the new bean instancebeanName
- the name of the bean
null
, no subsequent BeanPostProcessors will be invoked
Exception
- is thrown if error post processing beanpublic CamelContext getOrLookupCamelContext()
CamelContext
to use.
protected CamelPostProcessorHelper getPostProcessorHelper()
CamelPostProcessorHelper
protected boolean canPostProcessBean(Object bean, String beanName)
protected boolean canSetCamelContext(Object bean, String beanName)
protected void injectFields(Object bean, String beanName)
bean
- the bean to be injectedprotected void injectField(Field field, String endpointUri, String endpointRef, Object bean, String beanName)
protected void injectMethods(Object bean, String beanName)
protected void setterInjection(Method method, Object bean, String beanName)
protected void setterInjection(Method method, Object bean, String beanName, String endpointUri, String endpointRef)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |