Class RegistryBeanDefinition

java.lang.Object
org.apache.camel.model.app.RegistryBeanDefinition
All Implemented Interfaces:
org.apache.camel.spi.ResourceAware

@Metadata(label="configuration") public class RegistryBeanDefinition extends Object implements org.apache.camel.spi.ResourceAware
Define custom beans that can be used in your Camel routes and in general.
  • Constructor Details

    • RegistryBeanDefinition

      public RegistryBeanDefinition()
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
      The name of the bean (bean id)
    • getType

      public String getType()
    • setType

      public void setType(String type)
      The class name (fully qualified) of the bean
    • getInitMethod

      public String getInitMethod()
    • setInitMethod

      public void setInitMethod(String initMethod)
      The name of the custom initialization method to invoke after setting bean properties. The method must have no arguments, but may throw any exception.
    • getDestroyMethod

      public String getDestroyMethod()
    • setDestroyMethod

      public void setDestroyMethod(String destroyMethod)
      The name of the custom destroy method to invoke on bean shutdown, such as when Camel is shutting down. The method must have no arguments, but may throw any exception.
    • getFactoryMethod

      public String getFactoryMethod()
    • setFactoryMethod

      public void setFactoryMethod(String factoryMethod)
      Name of method to invoke when creating the bean via a factory bean.
    • getFactoryBean

      public String getFactoryBean()
    • setFactoryBean

      public void setFactoryBean(String factoryBean)
      Name of factory bean (bean id) to use for creating the bean.
    • getBuilderClass

      public String getBuilderClass()
    • setBuilderClass

      public void setBuilderClass(String builderClass)
      Fully qualified class name of builder class to use for creating and configuring the bean. The builder will use the properties values to configure the bean.
    • getBuilderMethod

      public String getBuilderMethod()
    • setBuilderMethod

      public void setBuilderMethod(String builderMethod)
      Name of method when using builder class. This method is invoked after configuring to create the actual bean. This method is often named build (used by default).
    • getConstructors

      public Map<Integer,Object> getConstructors()
    • setConstructors

      public void setConstructors(Map<Integer,Object> constructors)
      Optional constructor arguments for creating the bean. Arguments correspond to specific index of the constructor argument list, starting from zero.
    • getProperties

      public Map<String,Object> getProperties()
    • setProperties

      public void setProperties(Map<String,Object> properties)
      Optional properties to set on the created bean.
    • getScriptLanguage

      public String getScriptLanguage()
    • setScriptLanguage

      public void setScriptLanguage(String scriptLanguage)
      The script language to use when using inlined script for creating the bean, such as groovy, java, javascript etc.
    • setScript

      public void setScript(String script)
      The script to execute that creates the bean when using scripting languages. If the script use the prefix resource: such as resource:classpath:com/foo/myscript.groovy, resource:file:/var/myscript.groovy, then its loaded from the external resource.
    • getScript

      public String getScript()
    • getResource

      public org.apache.camel.spi.Resource getResource()
      Specified by:
      getResource in interface org.apache.camel.spi.ResourceAware
    • setResource

      public void setResource(org.apache.camel.spi.Resource resource)
      Specified by:
      setResource in interface org.apache.camel.spi.ResourceAware