@Override public void stopServer() throws Exception { LOG.debug("In stopServer method of class: {}", this.getClass().getName()); ChannelGroupFuture future = ALL_CHANNELS.close(); try { future.await(); } catch (InterruptedException e) { LOG.error("Execption occurred while waiting for channels to close: {}",e); } serverBootstrap.releaseExternalResources(); gameAdminService.shutdown(); }
@Override public void run() { log.debug("Releasing " + enlistedResources.size() + " Bootstrap."); for( Bootstrap bootstrap : enlistedResources ) { bootstrap.releaseExternalResources(); } } }