コード例 #1
0
ファイル: RouteService.java プロジェクト: anooppius2015/camel
 protected void stopChildService(Route route, Set<Service> services, boolean shutdown)
     throws Exception {
   for (Service service : services) {
     LOG.debug(
         "{} child service on route: {} -> {}",
         new Object[] {shutdown ? "Shutting down" : "Stopping", route.getId(), service});
     if (service instanceof ErrorHandler) {
       // special for error handlers
       for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
         strategy.onErrorHandlerRemove(
             route.getRouteContext(),
             (Processor) service,
             route.getRouteContext().getRoute().getErrorHandlerBuilder());
       }
     } else {
       for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
         strategy.onServiceRemove(camelContext, service, route);
       }
     }
     if (shutdown) {
       ServiceHelper.stopAndShutdownService(service);
     } else {
       ServiceHelper.stopService(service);
     }
     removeChildService(service);
   }
 }
コード例 #2
0
ファイル: NotifierRegistration.java プロジェクト: kym81/fuse
 @Override
 protected void doStop() throws Exception {
   LOG.info("Stopping " + notifier);
   managementStrategy.removeEventNotifier(notifier);
   ServiceHelper.stopAndShutdownService(notifier);
 }