public void disconnect() throws Exception { this.next.disconnect().await(); }
public void disconnect() throws Exception { this.next.disconnect().await(); }
@Override public void close() throws IOException { if(this.connectionArray!=null){ for(int p=0;p<this.connectionArray.length;p++){ if (this.connectionArray[p] != null) this.connectionArray[p].disconnect(); this.getLogger().info("NUMBER CONNECTION: "+PublisherSampler.numberOfConnection.getAndDecrement()); this.connectionArray[p]=null; } } this.connectionArray= null; }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { if (connection != null) { try { connection.disconnect().await(); connection.kill().await(); } catch (ShutdownException e) { LOGGER.info("Dispatcher has already been shut down."); } catch (Exception e) { LOGGER.error("Error shutting down MQTT device event receiver.", e); } } super.stop(monitor); }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { if (executor != null) { executor.shutdownNow(); } if (connection != null) { try { connection.disconnect().await(); connection.kill().await(); } catch (ShutdownException e) { LOGGER.info("Dispatcher has already been shut down."); } catch (Exception e) { LOGGER.error("Error shutting down MQTT device event receiver.", e); } } super.stop(monitor); }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { // Stop multicaster if configured. if (multicaster != null) { multicaster.lifecycleStop(monitor); } // Stop route builder if configured. if (routeBuilder != null) { routeBuilder.lifecycleStop(monitor); } if (connection != null) { try { connection.disconnect(); connection.kill(); } catch (Exception e) { LOGGER.error("Error shutting down MQTT device event receiver.", e); } } if (queue != null) { queue.suspend(); } super.stop(monitor); }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { if (processorsExecutor != null) { processorsExecutor.shutdownNow(); } if (subscriptionExecutor != null) { subscriptionExecutor.shutdownNow(); } if (connection != null) { try { connection.disconnect().await(); connection.kill().await(); } catch (ShutdownException e) { getLogger().info("Dispatcher has already been shut down."); } catch (Exception e) { getLogger().error("Error shutting down MQTT device event receiver.", e); } } super.stop(monitor); }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { if (connection != null) { try { connection.disconnect().await(); connection.kill().await(); } catch (ShutdownException e) { getLogger().info("Dispatcher has already been shut down."); } catch (Exception e) { getLogger().error("Error shutting down MQTT device event receiver.", e); } } super.stop(monitor); }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { // Stop multicaster if configured. if (multicaster != null) { multicaster.lifecycleStop(monitor); } // Stop route builder if configured. if (routeBuilder != null) { routeBuilder.lifecycleStop(monitor); } if (connection != null) { try { connection.disconnect(); connection.kill(); } catch (Exception e) { getLogger().error("Error shutting down MQTT device event receiver.", e); } } if (queue != null) { queue.suspend(); } super.stop(monitor); }