use of org.apache.camel.model.RouteContextRefDefinition in project camel by apache.
the class AbstractCamelContextFactoryBean method initRouteRefs.
protected void initRouteRefs() throws Exception {
// add route refs to existing routes
if (getRouteRefs() != null) {
for (RouteContextRefDefinition ref : getRouteRefs()) {
List<RouteDefinition> defs = ref.lookupRoutes(getContext());
for (RouteDefinition def : defs) {
LOG.debug("Adding route from {} -> {}", ref, def);
// add in top as they are most likely to be common/shared
// which you may want to start first
getRoutes().add(0, def);
}
}
}
}
Aggregations