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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getBean(org.apache.camel.Exchange exchange)
Gets the bean.BeanInfo
getBeanInfo()
Gets bean info for the bean.BeanInfo
getBeanInfo(Object bean)
Gets bean info for the given bean.Map<String,Object>
getOptions()
Additional options that should be configured on the beanorg.apache.camel.Processor
getProcessor()
Gets aProcessor
for this bean, if supported.void
setErrorHandler(org.apache.camel.Processor errorHandler)
Sets error handler used by @RecipientList EIPvoid
setOptions(Map<String,Object> options)
Sets additional options that should be configured on the beanboolean
supportProcessor()
Whether aProcessor
is 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 aProcessor
for this bean, if supported.- Returns:
- the
Processor
, or null if not supported.
-
supportProcessor
boolean supportProcessor()
Whether aProcessor
is 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 forBeanHolder
implementations such as theRegistryBean
.- Parameters:
bean
- the bean- Returns:
- null if not supported, then use
getBeanInfo()
instead.
-
-