Package org.apache.camel.spi
Interface BeanProcessorFactory
-
public interface BeanProcessorFactory
Factory for creating aProcessor
that can invoke a method on a bean and supporting using Camel bean parameter bindings. This requires to have camel-bean on the classpath.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Processor
createBeanProcessor(CamelContext camelContext, Object bean, Method method)
Creates the bean processor from the existing bean instanceProcessor
createBeanProcessor(CamelContext camelContext, Object bean, String beanType, Class<?> beanClass, String ref, String method, BeanScope scope)
Creates the bean processor from a given set of parameters that can refer to the bean via an existing bean, a reference to a bean, or its class name etc.
-
-
-
Field Detail
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
createBeanProcessor
Processor createBeanProcessor(CamelContext camelContext, Object bean, Method method) throws Exception
Creates the bean processor from the existing bean instance- Parameters:
camelContext
- the camel contextbean
- the beanmethod
- the method to invoke- Returns:
- the created processor
- Throws:
Exception
- is thrown if error creating the processor
-
createBeanProcessor
Processor createBeanProcessor(CamelContext camelContext, Object bean, String beanType, Class<?> beanClass, String ref, String method, BeanScope scope) throws Exception
Creates the bean processor from a given set of parameters that can refer to the bean via an existing bean, a reference to a bean, or its class name etc.- Parameters:
camelContext
- the camel contextbean
- the bean instancebeanType
- or the bean class namebeanClass
- or the bean classref
- or bean reference to lookup the bean from the registrymethod
- optional name of method to invokescope
- the scope of the bean- Returns:
- the created processor
- Throws:
Exception
- is thrown if error creating the processor
-
-