public class CamelPostProcessorHelper extends Object implements CamelContextAware
Constructor and Description |
---|
CamelPostProcessorHelper() |
CamelPostProcessorHelper(CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
void |
consumerInjection(Method method,
Object bean,
String beanName) |
protected Processor |
createConsumerProcessor(Object pojo,
Method method,
Endpoint endpoint)
Create a processor which invokes the given method when an incoming
message exchange is received
|
protected ConsumerTemplate |
createInjectionConsumerTemplate(String endpointUri,
String endpointRef,
String endpointProperty,
String injectionPointName)
Factory method to create a
ConsumerTemplate to be injected into a POJO |
protected PollingConsumer |
createInjectionPollingConsumer(Endpoint endpoint,
Object bean,
String beanName)
Factory method to create a started
PollingConsumer to be injected into a POJO |
protected Producer |
createInjectionProducer(Endpoint endpoint,
Object bean,
String beanName)
A Factory method to create a started
Producer to be injected into a POJO |
protected ProducerTemplate |
createInjectionProducerTemplate(String endpointUri,
String endpointRef,
String endpointProperty,
String injectionPointName,
Object bean)
Factory method to create a
ProducerTemplate to be injected into a POJO |
protected RuntimeException |
createProxyInstantiationRuntimeException(Class<?> type,
Endpoint endpoint,
Exception e) |
CamelContext |
getCamelContext()
Get the
CamelContext |
Endpoint |
getEndpointInjection(Object bean,
String uri,
String name,
String propertyName,
String injectionPointName,
boolean mandatory) |
Object |
getInjectionBeanValue(Class<?> type,
String name) |
Object |
getInjectionPropertyValue(Class<?> type,
String propertyName,
String propertyDefaultValue,
String injectionPointName,
Object bean,
String beanName) |
Object |
getInjectionValue(Class<?> type,
String endpointUri,
String endpointRef,
String endpointProperty,
String injectionPointName,
Object bean,
String beanName)
Creates the object to be injected for an
EndpointInject or Produce injection point |
protected boolean |
isSingleton(Object bean,
String beanName)
Implementations can override this method to determine if the bean is singleton.
|
boolean |
matchContext(String context)
Does the given context match this camel context
|
void |
setCamelContext(CamelContext camelContext)
Injects the
CamelContext |
protected void |
startService(Service service,
Object bean,
String beanName)
Stats the given service
|
void |
subscribeMethod(Method method,
Object bean,
String beanName,
String endpointUri,
String endpointName,
String endpointProperty) |
public CamelPostProcessorHelper()
public CamelPostProcessorHelper(CamelContext camelContext)
public CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic boolean matchContext(String context)
public void consumerInjection(Method method, Object bean, String beanName)
public void subscribeMethod(Method method, Object bean, String beanName, String endpointUri, String endpointName, String endpointProperty)
protected void startService(Service service, Object bean, String beanName) throws Exception
Exception
protected Processor createConsumerProcessor(Object pojo, Method method, Endpoint endpoint)
public Endpoint getEndpointInjection(Object bean, String uri, String name, String propertyName, String injectionPointName, boolean mandatory)
public Object getInjectionValue(Class<?> type, String endpointUri, String endpointRef, String endpointProperty, String injectionPointName, Object bean, String beanName)
EndpointInject
or Produce
injection pointpublic Object getInjectionPropertyValue(Class<?> type, String propertyName, String propertyDefaultValue, String injectionPointName, Object bean, String beanName)
public Object getInjectionBeanValue(Class<?> type, String name)
protected ProducerTemplate createInjectionProducerTemplate(String endpointUri, String endpointRef, String endpointProperty, String injectionPointName, Object bean)
ProducerTemplate
to be injected into a POJOprotected ConsumerTemplate createInjectionConsumerTemplate(String endpointUri, String endpointRef, String endpointProperty, String injectionPointName)
ConsumerTemplate
to be injected into a POJOprotected PollingConsumer createInjectionPollingConsumer(Endpoint endpoint, Object bean, String beanName)
PollingConsumer
to be injected into a POJOprotected Producer createInjectionProducer(Endpoint endpoint, Object bean, String beanName)
Producer
to be injected into a POJOprotected RuntimeException createProxyInstantiationRuntimeException(Class<?> type, Endpoint endpoint, Exception e)
protected boolean isSingleton(Object bean, String beanName)
bean
- the beanApache Camel