@Override public void shutdown() { camelContext.getExecutorServiceManager().shutdownNow(getScheduledExecutor()); } }
@Override protected void doStop() throws Exception { if (this.workerPool != null) { context.getExecutorServiceManager().shutdownNow(this.workerPool); this.workerPool = null; } }
@Override protected void doStop() throws Exception { if (this.scheduledExecutorService != null) { this.executorServiceManager.shutdownNow(scheduledExecutorService); } super.doStop(); }
@Override protected void doStop() throws Exception { if (registration != null) { registration.unregister(); } if (executor != null) { endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor); executor = null; } super.doStop(); } }
@Override protected void doStop() throws Exception { closeConnectionAndChannel(); if (executor != null) { if (endpoint != null && endpoint.getCamelContext() != null) { endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { executor.shutdownNow(); } executor = null; } }
@Override protected void doShutdown() throws Exception { if (asyncStartStopExecutorService != null) { getCamelContext().getExecutorServiceManager().shutdownNow(asyncStartStopExecutorService); asyncStartStopExecutorService = null; } super.doShutdown(); }
@Override protected void doStop() throws Exception { super.doStop(); log.info("Stopping CouchDB consumer"); if (task != null) { task.stop(); } if (executor != null) { endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor); executor = null; } }
@Override public void doStop() throws Exception { if (executor != null) { endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor); executor = null; } ServiceHelper.stopAndShutdownService(fileWatcher); lines.clear(); // do not close regular inputStream as it may be System.in etc. IOHelper.close(inputStreamToClose); super.doStop(); }
@Override protected void doStop() throws Exception { if (timer != null) { timer.stop(); timer = null; } if (executorService != null) { getCamelContext().getExecutorServiceManager().shutdownNow(executorService); executorService = null; } super.doStop(); }
@Override protected void doStop() throws Exception { super.doStop(); this.service.detachCamelConsumer(endpoint.getStream()); if (executor != null) { endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor); executor = null; } }
/** * Removes the notification listeners and terminates the background connection polling process if it exists */ @Override protected void doStop() throws Exception { super.doStop(); if (mScheduledExecutor != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(mScheduledExecutor); mScheduledExecutor = null; } removeNotificationListeners(); if (mConnector != null) { mConnector.close(); } ServiceHelper.stopService(mFormatter); if (shutdownExecutorService && executorService != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executorService); executorService = null; } }
@Override protected void doStop() throws Exception { super.doStop(); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { executor.shutdownNow(); } } executor = null; }
@Override protected void doStop() throws Exception { unInitReplyManager(); closeConnectionAndChannel(); if (executorService != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executorService); executorService = null; } }
@Override protected void doStop() throws Exception { if (scheduler != null) { getCamelContext().getExecutorServiceManager().shutdownNow(scheduler); scheduler = null; } if (configuration.isDeregisterServicesOnStop()) { for (Service service: client.agentClient().getServices().values()) { try { if (serviceList.contains(service.getId())) { client.agentClient().deregister(service.getId()); serviceList.remove(service.getId()); } } catch (Exception e) { LOGGER.warn("Error de-registering service: " + service, e); } } client = null; } }
@Override protected void doStop() throws Exception { super.doStop(); localLog.info("Stopping Google PubSub consumer for {}/{}", endpoint.getProjectId(), endpoint.getDestinationName()); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { executor.shutdownNow(); } } executor = null; }
@Override protected void doStop() throws Exception { super.doStop(); LOG.debug("Stopping Kubernetes Namespace Consumer"); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { if (nsWatcher != null) { nsWatcher.getWatch().close(); } getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { if (nsWatcher != null) { nsWatcher.getWatch().close(); } executor.shutdownNow(); } } executor = null; }
@Override protected void doStop() throws Exception { super.doStop(); LOG.debug("Stopping Kubernetes Services Consumer"); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { if (servicesWatcher != null) { servicesWatcher.getWatch().close(); } getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { if (servicesWatcher != null) { servicesWatcher.getWatch().close(); } executor.shutdownNow(); } } executor = null; }
@Override protected void doStop() throws Exception { super.doStop(); LOG.debug("Stopping Kubernetes Deployments Consumer"); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { if (deploymentsWatcher != null) { deploymentsWatcher.getWatch().close(); } getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { if (deploymentsWatcher != null) { deploymentsWatcher.getWatch().close(); } executor.shutdownNow(); } } executor = null; }
@Override protected void doStop() throws Exception { super.doStop(); LOG.debug("Stopping Kubernetes Pods Consumer"); if (executor != null) { if (getEndpoint() != null && getEndpoint().getCamelContext() != null) { if (podsWatcher != null) { podsWatcher.getWatch().close(); } getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor); } else { if (podsWatcher != null) { podsWatcher.getWatch().close(); } executor.shutdownNow(); } } executor = null; }
protected void stopAndDestroyListenerContainer() { if (listenerContainer != null) { try { listenerContainer.stop(); listenerContainer.destroy(); } finally { getEndpoint().onListenerContainerStopped(listenerContainer); } } // null container and listener so they are fully re created if this consumer is restarted // then we will use updated configuration from jms endpoint that may have been managed using JMX listenerContainer = null; messageListener = null; initialized = false; // shutdown thread pool if listener container was using a private thread pool if (shutdownExecutorService && executorService != null) { getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executorService); } executorService = null; }