Class RegistryBean

java.lang.Object
org.apache.camel.component.bean.RegistryBean
All Implemented Interfaces:
BeanHolder

public class RegistryBean extends Object implements BeanHolder
An implementation of a BeanHolder which will look up a bean from the registry and act as a cache of its metadata
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 interface BeanHolder
      Parameters:
      errorHandler - the error handler
    • getOptions

      public Map<String,Object> getOptions()
      Description copied from interface: BeanHolder
      Additional options that should be configured on the bean
      Specified by:
      getOptions in interface BeanHolder
    • setOptions

      public void setOptions(Map<String,Object> options)
      Description copied from interface: BeanHolder
      Sets additional options that should be configured on the bean
      Specified by:
      setOptions in interface BeanHolder
    • createCacheHolder

      public ConstantBeanHolder createCacheHolder()
      Creates a singleton (cached and constant) BeanHolder from this holder.
    • getBean

      public Object getBean(org.apache.camel.Exchange exchange) throws org.apache.camel.NoSuchBeanException
      Description copied from interface: BeanHolder
      Gets the bean.
      Specified by:
      getBean in interface BeanHolder
      Throws:
      org.apache.camel.NoSuchBeanException - is thrown if the bean cannot be found.
    • getProcessor

      public org.apache.camel.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.
    • supportProcessor

      public boolean supportProcessor()
      Description copied from interface: BeanHolder
      Whether a Processor is supported by this bean holder.
      Specified by:
      supportProcessor in interface BeanHolder
      Returns:
      true if the holder can supporting using a processor, false otherwise
    • 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.
    • getName

      public String getName()
    • getRegistry

      public org.apache.camel.spi.Registry getRegistry()
    • getContext

      public org.apache.camel.CamelContext getContext()
    • createBeanInfo

      protected BeanInfo createBeanInfo(Object bean)
    • lookupBean

      protected Object lookupBean()