Package org.apache.camel.support
Class RouteTemplateHelper
java.lang.Object
org.apache.camel.support.RouteTemplateHelper
Helper for working with route templates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
loadRouteTemplateFromLocation
(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.RouteTemplateLoaderListener listener, String templateId, String location) Loads the route template with the given template id from a given location.
-
Method Details
-
loadRouteTemplateFromLocation
public static void loadRouteTemplateFromLocation(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.RouteTemplateLoaderListener listener, String templateId, String location) throws Exception Loads the route template with the given template id from a given location. After the template is loaded, it is automatic added to theCamelContext
.- Parameters:
camelContext
- the camel contextlistener
- optional listener for when a route template is being loadedtemplateId
- the template idlocation
- location of the route template to load as a resource such as from classpath or file system- Throws:
Exception
- is thrown if any kind of error loading the route template
-