Package org.apache.camel.model
Class TemplatedRouteDefinition
java.lang.Object
org.apache.camel.model.TemplatedRouteDefinition
- All Implemented Interfaces:
org.apache.camel.CamelContextAware
,org.apache.camel.spi.HasCamelContext
@Metadata(label="configuration")
public class TemplatedRouteDefinition
extends Object
implements org.apache.camel.CamelContextAware
Defines a templated route (a route built from a route template)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a local bean as input of the route template.Adds a local bean as input of the route template.Adds a local bean as input of the route template.Adds a local bean as input of the route template.Adds a local bean as input of the route template.Adds a local bean as input of the route template.Adds a local bean as input of the route template.getBeans()
org.apache.camel.CamelContext
Adds an input parameter to build the route from the route template.parameters
(Map<String, String> parameters) Adds the input parameters to build the route from the route template.Sets a prefix to use for all node ids (not route id).Sets the id of the route built from the route template.routeTemplateRef
(String ref) Sets the id of the route template to use to build the route.void
setBeans
(List<TemplatedRouteBeanDefinition> beans) void
setCamelContext
(org.apache.camel.CamelContext camelContext) void
setParameters
(List<TemplatedRouteParameterDefinition> parameters) void
setPrefixId
(String prefixId) void
setRouteId
(String routeId) void
setRouteTemplateRef
(String routeTemplateRef)
-
Constructor Details
-
TemplatedRouteDefinition
public TemplatedRouteDefinition()
-
-
Method Details
-
getRouteTemplateRef
-
setRouteTemplateRef
-
getParameters
-
setParameters
-
getBeans
-
setBeans
-
getRouteId
-
setRouteId
-
getPrefixId
-
setPrefixId
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContext
in interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
parameter
Adds an input parameter to build the route from the route template.- Parameters:
name
- the name of the parametervalue
- the value of the parameter
-
parameters
Adds the input parameters to build the route from the route template.- Parameters:
parameters
- the parameters
-
bean
Adds a local bean as input of the route template.- Parameters:
name
- the name of the beantype
- the type of the bean to associate the binding
-
bean
Adds a local bean as input of the route template.- Parameters:
name
- the name of the beanbean
- the bean, or reference to bean (#class or #type), or a supplier for the bean
-
bean
Adds a local bean as input of the route template.- Parameters:
name
- the name of the beanbean
- the supplier for the bean
-
bean
public TemplatedRouteDefinition bean(String name, Class<?> type, org.apache.camel.RouteTemplateContext.BeanSupplier<Object> bean) Adds a local bean as input of the route template.- Parameters:
name
- the name of the beantype
- the type of the bean to associate the bindingbean
- a supplier for the bean
-
bean
Adds a local bean as input of the route template.- Parameters:
name
- the name of the beanlanguage
- the language to usescript
- the script to use for creating the local bean
-
bean
Adds a local bean as input of the route template.- Parameters:
name
- the name of the beantype
- the type of the bean to associate the bindinglanguage
- the language to usescript
- the script to use for creating the local bean
-
bean
Adds a local bean as input of the route template. (via fluent builder)- Parameters:
name
- the name of the bean- Returns:
- fluent builder to choose which language and script to use for creating the bean
-
prefixId
Sets a prefix to use for all node ids (not route id).- Parameters:
id
- the prefix id
-
routeId
Sets the id of the route built from the route template.- Parameters:
id
- the id the generated route
-
routeTemplateRef
Sets the id of the route template to use to build the route.- Parameters:
ref
- the id of the route template
-