List<RouteDefinition> reversedOutboundRoutes = reverse(outboundRoutes);
for (RouteDefinition route : reversedOutboundRoutes) {
camelContext.stopRoute(route.getId());
}
} catch (Exception e) {
throw new ExecutionException(e);
}
// stop the processor if it implements Configurable
LifecycleMethodsHelper.stop(connector);
// stop the inbound routes after stopping the connector
try {
for (RouteDefinition route : inboundRoutes) {
camelContext.stopRoute(route.getId());
}
} catch (Exception e) {
throw new ExecutionException(e);
}
state = State.STOPPED;
if (changeListener != null) {