/** * Stop the server. */ public void stop() { if (LOG.isInfoEnabled()) { LOG.info("stop: Halting netty server"); } ProgressableUtils.awaitChannelGroupFuture(accepted.close(), progressable); if (LOG.isInfoEnabled()) { LOG.info("stop: Start releasing resources"); } bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); ProgressableUtils.awaitTerminationFuture(bossGroup, progressable); ProgressableUtils.awaitTerminationFuture(workerGroup, progressable); if (useExecutionGroup) { executionGroup.shutdownGracefully(); ProgressableUtils.awaitTerminationFuture(executionGroup, progressable); } if (LOG.isInfoEnabled()) { LOG.info("stop: Netty server halted"); } }