Package org.apache.camel.component.bean
Class ConstantTypeBeanHolder
java.lang.Object
org.apache.camel.component.bean.ConstantTypeBeanHolder
- All Implemented Interfaces:
BeanHolder
,BeanTypeHolder
- Direct Known Subclasses:
ConstantStaticTypeBeanHolder
A constant (singleton) bean implementation of
BeanTypeHolder
-
Constructor Summary
ConstructorDescriptionConstantTypeBeanHolder
(Class<?> type, org.apache.camel.CamelContext context, ParameterMappingStrategy parameterMappingStrategy, BeanComponent beanComponent) ConstantTypeBeanHolder
(Class<?> type, BeanInfo beanInfo) -
Method Summary
Modifier and TypeMethodDescriptionCreates a cached and constantBeanHolder
from this holder.getBean
(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.Processor
Gets aProcessor
for this bean, if supported.Class<?>
getType()
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
Whether aProcessor
is supported by this bean holder.toString()
-
Constructor Details
-
ConstantTypeBeanHolder
public ConstantTypeBeanHolder(Class<?> type, org.apache.camel.CamelContext context, ParameterMappingStrategy parameterMappingStrategy, BeanComponent beanComponent) -
ConstantTypeBeanHolder
-
-
Method Details
-
setErrorHandler
public void setErrorHandler(org.apache.camel.Processor errorHandler) Description copied from interface:BeanHolder
Sets error handler used by @RecipientList EIP- Specified by:
setErrorHandler
in interfaceBeanHolder
- Parameters:
errorHandler
- the error handler
-
getOptions
Description copied from interface:BeanHolder
Additional options that should be configured on the bean- Specified by:
getOptions
in interfaceBeanHolder
-
setOptions
Description copied from interface:BeanHolder
Sets additional options that should be configured on the bean- Specified by:
setOptions
in interfaceBeanHolder
-
createCacheHolder
Creates a cached and constantBeanHolder
from this holder.- Returns:
- a new
BeanHolder
that has cached the lookup of the bean.
-
toString
-
getBean
Description copied from interface:BeanHolder
Gets the bean.- Specified by:
getBean
in interfaceBeanHolder
-
getProcessor
public org.apache.camel.Processor getProcessor()Description copied from interface:BeanHolder
Gets aProcessor
for this bean, if supported.- Specified by:
getProcessor
in interfaceBeanHolder
- Returns:
- the
Processor
, or null if not supported.
-
supportProcessor
public boolean supportProcessor()Description copied from interface:BeanHolder
Whether aProcessor
is supported by this bean holder.- Specified by:
supportProcessor
in interfaceBeanHolder
- Returns:
- true if the holder can supporting using a processor, false otherwise
-
getBeanInfo
Description copied from interface:BeanHolder
Gets bean info for the bean.- Specified by:
getBeanInfo
in interfaceBeanHolder
-
getBeanInfo
Description copied from interface:BeanHolder
Gets bean info for the given bean. This implementation allows a thread safe usage forBeanHolder
implementations such as theRegistryBean
.- Specified by:
getBeanInfo
in interfaceBeanHolder
- Parameters:
bean
- the bean- Returns:
- null if not supported, then use
BeanHolder.getBeanInfo()
instead.
-
getType
- Specified by:
getType
in interfaceBeanTypeHolder
-