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
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
org.apache.camel.spi.Resource
getType()
void
setBuilderClass
(String builderClass) Fully qualified class name of builder class to use for creating and configuring the bean.void
setBuilderMethod
(String builderMethod) Name of method when using builder class.void
setConstructors
(Map<Integer, Object> constructors) Optional constructor arguments for creating the bean.void
setDestroyMethod
(String destroyMethod) The name of the custom destroy method to invoke on bean shutdown, such as when Camel is shutting down.void
setFactoryBean
(String factoryBean) Name of factory bean (bean id) to use for creating the bean.void
setFactoryMethod
(String factoryMethod) Name of method to invoke when creating the bean via a factory bean.void
setInitMethod
(String initMethod) The name of the custom initialization method to invoke after setting bean properties.void
The name of the bean (bean id)void
setProperties
(Map<String, Object> properties) Optional properties to set on the created bean.void
setResource
(org.apache.camel.spi.Resource resource) void
The script to execute that creates the bean when using scripting languages.void
setScriptLanguage
(String scriptLanguage) The script language to use when using inlined script for creating the bean, such as groovy, java, javascript etc.void
The 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:
getResource
in interfaceorg.apache.camel.spi.ResourceAware
-
setResource
public void setResource(org.apache.camel.spi.Resource resource) - Specified by:
setResource
in interfaceorg.apache.camel.spi.ResourceAware
-