Package org.apache.camel.model.app
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()org.apache.camel.spi.ResourcegetType()voidsetBuilderClass(String builderClass) Fully qualified class name of builder class to use for creating and configuring the bean.voidsetBuilderMethod(String builderMethod) Name of method when using builder class.voidsetConstructors(Map<Integer, Object> constructors) Optional constructor arguments for creating the bean.voidsetDestroyMethod(String destroyMethod) The name of the custom destroy method to invoke on bean shutdown, such as when Camel is shutting down.voidsetFactoryBean(String factoryBean) Name of factory bean (bean id) to use for creating the bean.voidsetFactoryMethod(String factoryMethod) Name of method to invoke when creating the bean via a factory bean.voidsetInitMethod(String initMethod) The name of the custom initialization method to invoke after setting bean properties.voidThe name of the bean (bean id)voidsetProperties(Map<String, Object> properties) Optional properties to set on the created bean.voidsetResource(org.apache.camel.spi.Resource resource) voidThe script to execute that creates the bean when using scripting languages.voidsetScriptLanguage(String scriptLanguage) The script language to use when using inlined script for creating the bean, such as groovy, java, javascript etc.voidThe class name (fully qualified) of the bean
-
Constructor Details
-
RegistryBeanDefinition
public RegistryBeanDefinition()
-
-
Method Details
-
getName
-
setName
The name of the bean (bean id) -
getType
-
setType
The class name (fully qualified) of the bean -
getInitMethod
-
setInitMethod
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
-
setDestroyMethod
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
-
setFactoryMethod
Name of method to invoke when creating the bean via a factory bean. -
getFactoryBean
-
setFactoryBean
Name of factory bean (bean id) to use for creating the bean. -
getBuilderClass
-
setBuilderClass
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
-
setBuilderMethod
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
-
setConstructors
Optional constructor arguments for creating the bean. Arguments correspond to specific index of the constructor argument list, starting from zero. -
getProperties
-
setProperties
Optional properties to set on the created bean. -
getScriptLanguage
-
setScriptLanguage
The script language to use when using inlined script for creating the bean, such as groovy, java, javascript etc. -
setScript
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
-
getResource
public org.apache.camel.spi.Resource getResource()- Specified by:
getResourcein interfaceorg.apache.camel.spi.ResourceAware
-
setResource
public void setResource(org.apache.camel.spi.Resource resource) - Specified by:
setResourcein interfaceorg.apache.camel.spi.ResourceAware
-