Class RouteTemplateHelper


  • public final class RouteTemplateHelper
    extends Object
    Helper for working with route templates.
    • Method Detail

      • 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 the CamelContext.
        Parameters:
        camelContext - the camel context
        listener - optional listener for when a route template is being loaded
        templateId - the template id
        location - 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