Interface RoutesBuilder
public interface RoutesBuilder
Low-level SPI interface for objects that can contribute
Routes to a CamelContext.
Implementations translate a route definition (from any DSL or model) into live Route instances and register
them with the context. The actual routes become active after the context starts.
This interface is not intended to be used directly by Camel application developers. Application code should extend
org.apache.camel.builder.RouteBuilder (Java DSL) or use the YAML / XML DSLs instead, all of which implement
this interface under the hood.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoutesToCamelContext(CamelContext context) Adds the routes from this Route Builder to the CamelContext.voidAdds the templated routes from this Route Builder to the CamelContext.updateRoutesToCamelContext(CamelContext context) Adds or updates the routes from this Route Builder to the CamelContext.
-
Method Details
-
addRoutesToCamelContext
Adds the routes from this Route Builder to the CamelContext.- Parameters:
context- the Camel context- Throws:
Exception- is thrown if initialization of routes failed
-
addTemplatedRoutesToCamelContext
Adds the templated routes from this Route Builder to the CamelContext.- Parameters:
context- the Camel context- Throws:
Exception- is thrown if initialization of routes failed
-
updateRoutesToCamelContext
Adds or updates the routes from this Route Builder to the CamelContext.- Parameters:
context- the Camel context- Returns:
- route ids for the routes that was updated
- Throws:
Exception- is thrown if initialization of routes failed
-