org.apache.camel.component.bean
Class ConstantBeanHolder

java.lang.Object
  extended by org.apache.camel.component.bean.ConstantBeanHolder
All Implemented Interfaces:
BeanHolder

public class ConstantBeanHolder
extends Object
implements BeanHolder

A constant (singleton) bean implementation of BeanHolder

Version:

Constructor Summary
ConstantBeanHolder(Object bean, BeanInfo beanInfo)
           
ConstantBeanHolder(Object bean, CamelContext context)
           
ConstantBeanHolder(Object bean, CamelContext context, ParameterMappingStrategy parameterMappingStrategy)
           
 
Method Summary
 Object getBean()
          Gets the bean.
 BeanInfo getBeanInfo()
          Gets bean info for the bean.
 BeanInfo getBeanInfo(Object bean)
          Gets bean info for the given bean.
 Processor getProcessor()
          Gets a Processor for this bean, if supported.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantBeanHolder

public ConstantBeanHolder(Object bean,
                          BeanInfo beanInfo)

ConstantBeanHolder

public ConstantBeanHolder(Object bean,
                          CamelContext context)

ConstantBeanHolder

public ConstantBeanHolder(Object bean,
                          CamelContext context,
                          ParameterMappingStrategy parameterMappingStrategy)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getBean

public Object getBean()
Description copied from interface: BeanHolder
Gets the bean.

Specified by:
getBean in interface BeanHolder

getProcessor

public Processor getProcessor()
Description copied from interface: BeanHolder
Gets a Processor for this bean, if supported.

Specified by:
getProcessor in interface BeanHolder
Returns:
the Processor, or null if not supported.

getBeanInfo

public BeanInfo getBeanInfo()
Description copied from interface: BeanHolder
Gets bean info for the bean.

Specified by:
getBeanInfo in interface BeanHolder

getBeanInfo

public BeanInfo getBeanInfo(Object bean)
Description copied from interface: BeanHolder
Gets bean info for the given bean.

This implementation allows a thread safe usage for BeanHolder implementations such as the RegistryBean.

Specified by:
getBeanInfo in interface BeanHolder
Parameters:
bean - the bean
Returns:
null if not supported, then use BeanHolder.getBeanInfo() instead.


Apache Camel