org.apache.camel.impl
Class CamelPostProcessorHelper

java.lang.Object
  extended by org.apache.camel.impl.CamelPostProcessorHelper
All Implemented Interfaces:
CamelContextAware

public class CamelPostProcessorHelper
extends Object
implements CamelContextAware

A helper class for Camel based injector or post processing hooks which can be reused by both the Spring and Guice support.

Version:
$Revision: 788297 $

Constructor Summary
CamelPostProcessorHelper()
           
CamelPostProcessorHelper(CamelContext camelContext)
           
 
Method Summary
 void consumerInjection(Method method, Object bean)
           
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  PollingConsumer createInjectionPollingConsumer(Endpoint endpoint)
          Factory method to create a started PollingConsumer to be injected into a POJO
protected  Producer createInjectionProducer(Endpoint endpoint)
          A Factory method to create a started Producer to be injected into a POJO
protected  ProducerTemplate createInjectionProducerTemplate(String endpointUri, String endpointRef, String injectionPointName)
          Factory method to create a ProducerTemplate to be injected into a POJO
protected  RuntimeException createProxyInstantiationRuntimeException(Class<?> type, Endpoint endpoint, Exception e)
           
 CamelContext getCamelContext()
           
protected  Endpoint getEndpointInjection(String uri, String name, String injectionPointName, boolean mandatory)
           
 Object getInjectionValue(Class<?> type, String endpointUri, String endpointRef, String injectionPointName)
          Creates the object to be injected for an EndpointInject or Produce injection point
 boolean matchContext(String context)
          Does the given context match this camel context
 void setCamelContext(CamelContext camelContext)
          Injects the CamelContext
 void startService(Service service)
           
 void subscribeMethod(Method method, Object bean, String endpointUri, String endpointName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelPostProcessorHelper

public CamelPostProcessorHelper()

CamelPostProcessorHelper

public CamelPostProcessorHelper(CamelContext camelContext)
Method Detail

getCamelContext

public CamelContext getCamelContext()

setCamelContext

public void setCamelContext(CamelContext camelContext)
Description copied from interface: CamelContextAware
Injects the CamelContext

Specified by:
setCamelContext in interface CamelContextAware
Parameters:
camelContext - the Camel context

matchContext

public boolean matchContext(String context)
Does the given context match this camel context


consumerInjection

public void consumerInjection(Method method,
                              Object bean)

subscribeMethod

public void subscribeMethod(Method method,
                            Object bean,
                            String endpointUri,
                            String endpointName)

startService

public void startService(Service service)
                  throws Exception
Throws:
Exception

createConsumerProcessor

protected Processor createConsumerProcessor(Object pojo,
                                            Method method,
                                            Endpoint endpoint)
Create a processor which invokes the given method when an incoming message exchange is received


getEndpointInjection

protected Endpoint getEndpointInjection(String uri,
                                        String name,
                                        String injectionPointName,
                                        boolean mandatory)

getInjectionValue

public Object getInjectionValue(Class<?> type,
                                String endpointUri,
                                String endpointRef,
                                String injectionPointName)
Creates the object to be injected for an EndpointInject or Produce injection point


createInjectionProducerTemplate

protected ProducerTemplate createInjectionProducerTemplate(String endpointUri,
                                                           String endpointRef,
                                                           String injectionPointName)
Factory method to create a ProducerTemplate to be injected into a POJO


createInjectionPollingConsumer

protected PollingConsumer createInjectionPollingConsumer(Endpoint endpoint)
Factory method to create a started PollingConsumer to be injected into a POJO


createInjectionProducer

protected Producer createInjectionProducer(Endpoint endpoint)
A Factory method to create a started Producer to be injected into a POJO


createProxyInstantiationRuntimeException

protected RuntimeException createProxyInstantiationRuntimeException(Class<?> type,
                                                                    Endpoint endpoint,
                                                                    Exception e)


Apache CAMEL