Interface BeanHolder

All Known Subinterfaces:
BeanTypeHolder
All Known Implementing Classes:
ConstantBeanHolder, ConstantStaticTypeBeanHolder, ConstantTypeBeanHolder, RegistryBean, RequestBeanHolder

public interface BeanHolder
Object holder for a bean.
  • Method Summary

    Modifier and Type
    Method
    Description
    getBean(org.apache.camel.Exchange exchange)
    Gets the bean.
    Gets bean info for the bean.
    Gets bean info for the given bean.
    Additional options that should be configured on the bean
    org.apache.camel.Processor
    Gets a Processor for this bean, if supported.
    void
    setErrorHandler(org.apache.camel.Processor errorHandler)
    Sets error handler used by @RecipientList EIP
    void
    Sets additional options that should be configured on the bean
    boolean
    Whether a Processor is supported by this bean holder.
  • Method Details

    • setErrorHandler

      void setErrorHandler(org.apache.camel.Processor errorHandler)
      Sets error handler used by @RecipientList EIP
      Parameters:
      errorHandler - the error handler
    • getOptions

      Map<String,Object> getOptions()
      Additional options that should be configured on the bean
    • setOptions

      void setOptions(Map<String,Object> options)
      Sets additional options that should be configured on the bean
    • getBean

      Object getBean(org.apache.camel.Exchange exchange) throws org.apache.camel.NoSuchBeanException
      Gets the bean.
      Throws:
      org.apache.camel.NoSuchBeanException - is thrown if the bean cannot be found.
    • getProcessor

      org.apache.camel.Processor getProcessor()
      Gets a Processor for this bean, if supported.
      Returns:
      the Processor, or null if not supported.
    • supportProcessor

      boolean supportProcessor()
      Whether a Processor is supported by this bean holder.
      Returns:
      true if the holder can supporting using a processor, false otherwise
    • getBeanInfo

      BeanInfo getBeanInfo()
      Gets bean info for the bean.
    • getBeanInfo

      BeanInfo getBeanInfo(Object bean)
      Gets bean info for the given bean.

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

      Parameters:
      bean - the bean
      Returns:
      null if not supported, then use getBeanInfo() instead.