// Implementation methods
// -------------------------------------------------------------------------
protected RouteContext addRoutes(Collection<Route> routes, FromDefinition fromType) throws Exception {
RouteContext routeContext = new DefaultRouteContext(this, fromType, routes);
routeContext.getEndpoint(); // force endpoint resolution
if (camelContext != null) {
camelContext.getLifecycleStrategy().onRouteContextCreate(routeContext);
}
List<ProcessorDefinition> list = new ArrayList<ProcessorDefinition>(outputs);
for (ProcessorDefinition output : list) {
output.addRoutes(routeContext, routes);
}
routeContext.commit();
return routeContext;
}