@Metadata(label="configuration") public class RouteTemplateBeanDefinition extends Object
Constructor and Description |
---|
RouteTemplateBeanDefinition() |
RouteTemplateBeanDefinition(RouteTemplateDefinition parent) |
RouteTemplateBeanDefinition(String name) |
Modifier and Type | Method and Description |
---|---|
RouteTemplateDefinition |
bean(Class<?> type)
Calls a method on a bean for creating the local template bean
|
RouteTemplateDefinition |
bean(Class<?> type,
String method)
Calls a method on a bean for creating the local template bean
|
RouteTemplateBeanDefinition |
beanType(Class<?> type)
To set the return type of the script (fully qualified class name).
|
RouteTemplateBeanDefinition |
beanType(String type)
To set the return type of the script (fully qualified class name).
|
RouteTemplateDefinition |
end() |
Class<?> |
getBeanClass() |
org.apache.camel.RouteTemplateContext.BeanSupplier<Object> |
getBeanSupplier() |
String |
getBeanType() |
String |
getName() |
List<PropertyDefinition> |
getProperties() |
RouteTemplateScriptDefinition |
getScript() |
String |
getType() |
RouteTemplateDefinition |
groovy(String script)
Calls a groovy script for creating the local template bean
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.
|
RouteTemplateDefinition |
joor(String script)
Calls joor script (Java source that is runtime compiled to Java bytecode) for creating the local template bean
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.
|
RouteTemplateDefinition |
language(String language,
String script)
Calls a custom language for creating the local template bean
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.
|
RouteTemplateDefinition |
mvel(String script)
Calls a MvEL script for creating the local template bean
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.
|
RouteTemplateDefinition |
ognl(String script)
Calls a OGNL script for creating the local template bean
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.
|
RouteTemplateBeanDefinition |
properties(Map<String,String> properties)
Sets properties to set on the created local bean
|
RouteTemplateBeanDefinition |
property(String key,
String value)
Sets a property to set on the created local bean
|
void |
setBeanSupplier(org.apache.camel.RouteTemplateContext.BeanSupplier<Object> beanSupplier)
Bean supplier that uses lambda style to create the local bean
|
void |
setBeanType(Class<?> beanType)
To set the type (fully qualified class name) of the returned bean created by the script.
|
void |
setBeanType(String beanType)
To set the type (fully qualified class name) of the returned bean created by the script.
|
void |
setName(String name)
Bean name
|
void |
setProperties(List<PropertyDefinition> properties)
Optional properties to set on the created local bean
|
void |
setScript(RouteTemplateScriptDefinition script)
The script to execute that creates the bean when using scripting languages.
|
void |
setScript(String script)
The script to execute that creates the bean when using scripting languages.
|
void |
setType(String type)
What type to use for creating the bean.
|
RouteTemplateBeanDefinition |
type(String type)
What type to use for creating the bean.
|
RouteTemplateBeanDefinition |
type(String prefix,
Class<?> type)
What type to use for creating the bean.
|
RouteTemplateBeanDefinition |
typeClass(Class<?> type)
Creates the bean from the given class type
|
RouteTemplateBeanDefinition |
typeClass(String type)
Creates the bean from the given class type
|
public RouteTemplateBeanDefinition()
public RouteTemplateBeanDefinition(String name)
public RouteTemplateBeanDefinition(RouteTemplateDefinition parent)
public String getName()
public void setName(String name)
public String getType()
public void setType(String type)
public String getBeanType()
public void setBeanType(String beanType)
public void setBeanType(Class<?> beanType)
public Class<?> getBeanClass()
public List<PropertyDefinition> getProperties()
public void setProperties(List<PropertyDefinition> properties)
public org.apache.camel.RouteTemplateContext.BeanSupplier<Object> getBeanSupplier()
public void setBeanSupplier(org.apache.camel.RouteTemplateContext.BeanSupplier<Object> beanSupplier)
public RouteTemplateScriptDefinition getScript()
public void setScript(RouteTemplateScriptDefinition script)
public void setScript(String script)
public RouteTemplateBeanDefinition type(String prefix, Class<?> type)
public RouteTemplateBeanDefinition type(String type)
public RouteTemplateBeanDefinition typeClass(Class<?> type)
type
- the type of the class to create as beanpublic RouteTemplateBeanDefinition typeClass(String type)
type
- the type of the class to create as beanpublic RouteTemplateBeanDefinition beanType(Class<?> type)
type
- the fully qualified type of the returned bean from the scriptpublic RouteTemplateBeanDefinition beanType(String type)
type
- the fully qualified type of the returned bean from the scriptpublic RouteTemplateDefinition bean(Class<?> type)
type
- the bean class to callpublic RouteTemplateDefinition bean(Class<?> type, String method)
type
- the bean class to callmethod
- the name of the method to callpublic RouteTemplateDefinition groovy(String script)
script
- the scriptpublic RouteTemplateDefinition joor(String script)
script
- the scriptpublic RouteTemplateDefinition language(String language, String script)
language
- the languagescript
- the scriptpublic RouteTemplateDefinition mvel(String script)
script
- the scriptpublic RouteTemplateDefinition ognl(String script)
script
- the scriptpublic RouteTemplateBeanDefinition property(String key, String value)
key
- the property namevalue
- the property valuepublic RouteTemplateBeanDefinition properties(Map<String,String> properties)
public RouteTemplateDefinition end()
Apache Camel