Package org.apache.camel.component.bean
Interface BeanHolder
- All Known Subinterfaces:
BeanTypeHolder
- All Known Implementing Classes:
ConstantBeanHolder,ConstantStaticTypeBeanHolder,ConstantTypeBeanHolder,RegistryBean,RequestBeanHolder
public interface BeanHolder
Object holder for a bean.
-
Method Summary
Modifier and TypeMethodDescriptiongetBean(org.apache.camel.Exchange exchange) Gets the bean.Gets bean info for the bean.getBeanInfo(Object bean) Gets bean info for the given bean.Additional options that should be configured on the beanorg.apache.camel.ProcessorGets 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 beanbooleanWhether aProcessoris supported by this bean holder.
-
Method Details
-
setErrorHandler
void setErrorHandler(org.apache.camel.Processor errorHandler) Sets error handler used by @RecipientList EIP- Parameters:
errorHandler- the error handler
-
getOptions
Additional options that should be configured on the bean -
setOptions
Sets additional options that should be configured on the bean -
getBean
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
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.
-