Package org.apache.camel.impl.engine
Class CamelPostProcessorHelper
java.lang.Object
org.apache.camel.impl.engine.CamelPostProcessorHelper
- All Implemented Interfaces:
org.apache.camel.CamelContextAware
,org.apache.camel.spi.HasCamelContext
A helper class for Camel based injector or bean post-processing hooks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
consumerInjection
(Method method, Object bean, String beanName) protected org.apache.camel.ConsumerTemplate
createInjectionConsumerTemplate
(String endpointUri, String endpointProperty, String injectionPointName) Factory method to create aConsumerTemplate
to be injected into a POJOprotected org.apache.camel.FluentProducerTemplate
createInjectionFluentProducerTemplate
(String endpointUri, String endpointProperty, String injectionPointName, Object bean) Factory method to create aFluentProducerTemplate
to be injected into a POJOprotected org.apache.camel.PollingConsumer
createInjectionPollingConsumer
(org.apache.camel.Endpoint endpoint, Object bean, String beanName) Factory method to create a startedPollingConsumer
to be injected into a POJOprotected org.apache.camel.Producer
createInjectionProducer
(org.apache.camel.Endpoint endpoint, Object bean, String beanName) A Factory method to create a startedProducer
to be injected into a POJOprotected org.apache.camel.ProducerTemplate
createInjectionProducerTemplate
(String endpointUri, String endpointProperty, String injectionPointName, Object bean) Factory method to create aProducerTemplate
to be injected into a POJOprotected RuntimeException
createProxyInstantiationRuntimeException
(Class<?> type, org.apache.camel.Endpoint endpoint, Exception e) org.apache.camel.CamelContext
protected SubscribeMethodProcessor
getConsumerProcessor
(org.apache.camel.Endpoint endpoint) org.apache.camel.Endpoint
getEndpointInjection
(Object bean, String uri, String propertyName, String injectionPointName, boolean mandatory) getInjectionBeanConfigValue
(Class<?> type, String name) getInjectionBeanMethodValue
(org.apache.camel.CamelContext context, Method method, Object bean, String beanName) getInjectionBeanValue
(Class<?> type, String name) getInjectionPropertyValue
(Class<?> type, String propertyName, String propertyDefaultValue, String injectionPointName, Object bean, String beanName) getInjectionValue
(Class<?> type, String endpointUri, String endpointProperty, String injectionPointName, Object bean, String beanName) Creates the object to be injected for anEndpointInject
orProduce
injection pointgetInjectionValue
(Class<?> type, String endpointUri, String endpointProperty, String injectionPointName, Object bean, String beanName, boolean binding) Creates the object to be injected for anEndpointInject
orProduce
injection pointprotected boolean
isSingleton
(Object bean, String beanName) Implementations can override this method to determine if the bean is singleton.void
setCamelContext
(org.apache.camel.CamelContext camelContext) protected void
startService
(org.apache.camel.Service service, org.apache.camel.CamelContext camelContext, Object bean, String beanName) Stats the given servicevoid
subscribeMethod
(Method method, Object bean, String beanName, String endpointUri, String endpointProperty, String predicate)
-
Constructor Details
-
CamelPostProcessorHelper
public CamelPostProcessorHelper() -
CamelPostProcessorHelper
public CamelPostProcessorHelper(org.apache.camel.CamelContext camelContext)
-
-
Method Details
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContext
in interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
consumerInjection
-
subscribeMethod
-
startService
protected void startService(org.apache.camel.Service service, org.apache.camel.CamelContext camelContext, Object bean, String beanName) throws Exception Stats the given service- Throws:
Exception
-
getConsumerProcessor
-
getEndpointInjection
-
getInjectionValue
public Object getInjectionValue(Class<?> type, String endpointUri, String endpointProperty, String injectionPointName, Object bean, String beanName) Creates the object to be injected for anEndpointInject
orProduce
injection point -
getInjectionValue
public Object getInjectionValue(Class<?> type, String endpointUri, String endpointProperty, String injectionPointName, Object bean, String beanName, boolean binding) Creates the object to be injected for anEndpointInject
orProduce
injection point -
getInjectionPropertyValue
-
getInjectionBeanValue
-
getInjectionBeanConfigValue
-
getInjectionBeanMethodValue
-
createInjectionProducerTemplate
protected org.apache.camel.ProducerTemplate createInjectionProducerTemplate(String endpointUri, String endpointProperty, String injectionPointName, Object bean) Factory method to create aProducerTemplate
to be injected into a POJO -
createInjectionFluentProducerTemplate
protected org.apache.camel.FluentProducerTemplate createInjectionFluentProducerTemplate(String endpointUri, String endpointProperty, String injectionPointName, Object bean) Factory method to create aFluentProducerTemplate
to be injected into a POJO -
createInjectionConsumerTemplate
protected org.apache.camel.ConsumerTemplate createInjectionConsumerTemplate(String endpointUri, String endpointProperty, String injectionPointName) Factory method to create aConsumerTemplate
to be injected into a POJO -
createInjectionPollingConsumer
protected org.apache.camel.PollingConsumer createInjectionPollingConsumer(org.apache.camel.Endpoint endpoint, Object bean, String beanName) Factory method to create a startedPollingConsumer
to be injected into a POJO -
createInjectionProducer
protected org.apache.camel.Producer createInjectionProducer(org.apache.camel.Endpoint endpoint, Object bean, String beanName) A Factory method to create a startedProducer
to be injected into a POJO -
createProxyInstantiationRuntimeException
protected RuntimeException createProxyInstantiationRuntimeException(Class<?> type, org.apache.camel.Endpoint endpoint, Exception e) -
isSingleton
Implementations can override this method to determine if the bean is singleton.- Parameters:
bean
- the bean- Returns:
- true if its singleton scoped, for prototype scoped false is returned.
-