Package org.apache.camel.component.bean
Interface BeanHolder
-
- All Known Subinterfaces:
BeanTypeHolder
- All Known Implementing Classes:
ConstantBeanHolder,ConstantStaticTypeBeanHolder,ConstantTypeBeanHolder,RegistryBean,RequestBeanHolder
public interface BeanHolderObject holder for a bean.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetBean(org.apache.camel.Exchange exchange)Gets the bean.BeanInfogetBeanInfo()Gets bean info for the bean.BeanInfogetBeanInfo(Object bean)Gets bean info for the given bean.Map<String,Object>getOptions()Additional options that should be configured on the beanorg.apache.camel.ProcessorgetProcessor()Gets aProcessorfor this bean, if supported.voidsetErrorHandler(org.apache.camel.Processor errorHandler)Sets error handler used by @RecipientList EIPvoidsetOptions(Map<String,Object> options)Sets additional options that should be configured on the beanbooleansupportProcessor()Whether aProcessoris supported by this bean holder.
-
-
-
Method Detail
-
setErrorHandler
void setErrorHandler(org.apache.camel.Processor errorHandler)
Sets error handler used by @RecipientList EIP- Parameters:
errorHandler- the error handler
-
getOptions
Map<String,Object> getOptions()
Additional options that should be configured on the bean
-
setOptions
void setOptions(Map<String,Object> options)
Sets additional options that should be configured on the bean
-
getBean
Object getBean(org.apache.camel.Exchange exchange) throws org.apache.camel.NoSuchBeanException
Gets the bean.- Throws:
org.apache.camel.NoSuchBeanException- is thrown if the bean cannot be found.
-
getProcessor
org.apache.camel.Processor getProcessor()
Gets aProcessorfor this bean, if supported.- Returns:
- the
Processor, or null if not supported.
-
supportProcessor
boolean supportProcessor()
Whether aProcessoris supported by this bean holder.- Returns:
- true if the holder can supporting using a processor, false otherwise
-
getBeanInfo
BeanInfo getBeanInfo()
Gets bean info for the bean.
-
getBeanInfo
BeanInfo getBeanInfo(Object bean)
Gets bean info for the given bean. This implementation allows a thread safe usage forBeanHolderimplementations such as theRegistryBean.- Parameters:
bean- the bean- Returns:
- null if not supported, then use
getBeanInfo()instead.
-
-