use of org.apache.camel.spi.RoutePolicy in project camel by apache.
the class RouteService method doStart.
protected void doStart() throws Exception {
warmUp();
for (Route route : routes) {
try (MDCHelper mdcHelper = new MDCHelper(route.getId())) {
// start the route itself
ServiceHelper.startService(route);
// invoke callbacks on route policy
if (route.getRouteContext().getRoutePolicyList() != null) {
for (RoutePolicy routePolicy : route.getRouteContext().getRoutePolicyList()) {
routePolicy.onStart(route);
}
}
// fire event
EventHelper.notifyRouteStarted(camelContext, route);
}
}
}
Aggregations