public final class TemplatedRouteBuilder extends Object
Modifier and Type | Method and Description |
---|---|
String |
add()
Adds the route to the
CamelContext which is built from the configured route template. |
TemplatedRouteBuilder |
bean(String id,
Class<?> type,
Object bean)
Binds the bean to the template local repository (takes precedence over global beans)
|
TemplatedRouteBuilder |
bean(String id,
Class<?> type,
Supplier<Object> bean)
Binds the bean (via a supplier) to the template local repository (takes precedence over global beans)
|
TemplatedRouteBuilder |
bean(String id,
Object bean)
Binds the bean to the template local repository (takes precedence over global beans)
|
static TemplatedRouteBuilder |
builder(org.apache.camel.CamelContext camelContext,
String routeTemplateId)
Creates a new
TemplatedRouteBuilder to specify input parameters, and others, for the route template. |
TemplatedRouteBuilder |
configure(Consumer<org.apache.camel.RouteTemplateContext> configurer)
Sets a configurer which allows to do configuration while the route template is being used to create a route.
|
TemplatedRouteBuilder |
handler(Consumer<RouteTemplateDefinition> handler)
Sets a handler which gives access to the route template model that will be used for creating the route.
|
TemplatedRouteBuilder |
parameter(String name,
Object value)
Adds a parameter the route template will use when creating the route.
|
TemplatedRouteBuilder |
parameters(Map<String,Object> parameters)
Adds parameters the route template will use when creating the route.
|
TemplatedRouteBuilder |
routeId(String routeId)
Sets the id of the route.
|
public static TemplatedRouteBuilder builder(org.apache.camel.CamelContext camelContext, String routeTemplateId)
TemplatedRouteBuilder
to specify input parameters, and others, for the route template.camelContext
- the camel contextrouteTemplateId
- the id of the route templatepublic TemplatedRouteBuilder routeId(String routeId)
routeId
- the route idpublic TemplatedRouteBuilder parameter(String name, Object value)
name
- parameter namevalue
- parameter valuepublic TemplatedRouteBuilder parameters(Map<String,Object> parameters)
parameters
- the template parameters to addpublic TemplatedRouteBuilder bean(String id, Object bean)
id
- the id of the beanbean
- the beanpublic TemplatedRouteBuilder bean(String id, Class<?> type, Object bean)
id
- the id of the beantype
- the type of the bean to associate the bindingbean
- the beanpublic TemplatedRouteBuilder bean(String id, Class<?> type, Supplier<Object> bean)
id
- the id of the beantype
- the type of the bean to associate the bindingbean
- the beanpublic TemplatedRouteBuilder handler(Consumer<RouteTemplateDefinition> handler)
handler
- the handler with callback to invoke with the given route templatepublic TemplatedRouteBuilder configure(Consumer<org.apache.camel.RouteTemplateContext> configurer)
configurer
- the configurer with callback to invoke with the given route template contextpublic String add()
CamelContext
which is built from the configured route template.Apache Camel