Example #1
0
 /**
  * Adds a set of routing/configuration rules to the host {@link CamelContext} using the supplied
  * {@link RouteLoader}.
  *
  * @param loader The loader for the routes you wish to load.
  */
 public void load(final RouteLoader loader) {
   notNull(loader, "Route loader cannot be null.");
   try {
     log.debug("Adding routes to context {}.", hostContext.getName());
     hostContext.addRoutes(loader.load());
   } catch (Exception e) {
     throw new LifecycleException(e.getLocalizedMessage(), e);
   }
 }
Example #2
0
 /**
  * Sends new routing configuration to the control channel, which is subsequently processed based
  * on the chosen startup mode (as set by the {@code axiom.bootstrap.startup.mode} system
  * property).
  *
  * @param routeLoader An object which can load the configuration you wish to apply
  */
 public void configure(final RouteLoader routeLoader) {
   configure(routeLoader.load());
 }