org.apache.camel.component.bean
Class ConstantTypeBeanHolder

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

public class ConstantTypeBeanHolder
extends Object
implements BeanTypeHolder

A constant (singleton) bean implementation of BeanTypeHolder

Version:

Constructor Summary
ConstantTypeBeanHolder(Class<?> type, BeanInfo beanInfo)
           
ConstantTypeBeanHolder(Class<?> type, CamelContext context)
           
ConstantTypeBeanHolder(Class<?> type, 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.
 Class<?> getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantTypeBeanHolder

public ConstantTypeBeanHolder(Class<?> type,
                              BeanInfo beanInfo)

ConstantTypeBeanHolder

public ConstantTypeBeanHolder(Class<?> type,
                              CamelContext context)

ConstantTypeBeanHolder

public ConstantTypeBeanHolder(Class<?> type,
                              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.

getType

public Class<?> getType()
Specified by:
getType in interface BeanTypeHolder


Apache Camel