public class RegistryBean extends Object implements BeanHolder
BeanHolder
which will look up a bean from the registry and act as a cache of its
metadataConstructor and Description |
---|
RegistryBean(org.apache.camel.CamelContext context,
String name,
ParameterMappingStrategy parameterMappingStrategy,
BeanComponent beanComponent) |
Modifier and Type | Method and Description |
---|---|
protected BeanInfo |
createBeanInfo(Object bean) |
ConstantBeanHolder |
createCacheHolder()
Creates a singleton (cached and constant)
BeanHolder from this holder. |
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.
|
org.apache.camel.CamelContext |
getContext() |
String |
getName() |
Map<String,Object> |
getOptions()
Additional options that should be configured on the bean
|
org.apache.camel.Processor |
getProcessor()
Gets a
Processor for this bean, if supported. |
org.apache.camel.spi.Registry |
getRegistry() |
protected Object |
lookupBean() |
void |
setErrorHandler(org.apache.camel.Processor errorHandler)
Sets error handler used by @RecipientList EIP
|
void |
setOptions(Map<String,Object> options)
Sets additional options that should be configured on the bean
|
boolean |
supportProcessor()
Whether a
Processor is supported by this bean holder. |
String |
toString() |
public RegistryBean(org.apache.camel.CamelContext context, String name, ParameterMappingStrategy parameterMappingStrategy, BeanComponent beanComponent)
public void setErrorHandler(org.apache.camel.Processor errorHandler)
BeanHolder
setErrorHandler
in interface BeanHolder
errorHandler
- the error handlerpublic Map<String,Object> getOptions()
BeanHolder
getOptions
in interface BeanHolder
public void setOptions(Map<String,Object> options)
BeanHolder
setOptions
in interface BeanHolder
public ConstantBeanHolder createCacheHolder()
BeanHolder
from this holder.public Object getBean(org.apache.camel.Exchange exchange) throws org.apache.camel.NoSuchBeanException
BeanHolder
getBean
in interface BeanHolder
org.apache.camel.NoSuchBeanException
- is thrown if the bean cannot be found.public org.apache.camel.Processor getProcessor()
BeanHolder
Processor
for this bean, if supported.getProcessor
in interface BeanHolder
Processor
, or null if not supported.public boolean supportProcessor()
BeanHolder
Processor
is supported by this bean holder.supportProcessor
in interface BeanHolder
public BeanInfo getBeanInfo()
BeanHolder
getBeanInfo
in interface BeanHolder
public BeanInfo getBeanInfo(Object bean)
BeanHolder
BeanHolder
implementations such as the
RegistryBean
.getBeanInfo
in interface BeanHolder
bean
- the beanBeanHolder.getBeanInfo()
instead.public String getName()
public org.apache.camel.spi.Registry getRegistry()
public org.apache.camel.CamelContext getContext()
protected Object lookupBean()
Apache Camel