Package org.apache.camel.spi
Interface BeanProcessorFactory
public interface BeanProcessorFactory
Factory for creating a
Processor
that can invoke a method on a bean and supporting using Camel bean parameter
bindings.
This requires to have camel-bean on the classpath.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateBeanProcessor
(CamelContext camelContext, Object bean, Method method) Creates the bean processor from the existing bean instancecreateBeanProcessor
(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 Details
-
FACTORY
Service factory key.- See Also:
-
-
Method Details
-
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
-