@Override
 public void dispose() {
   try {
     openChannels.close().awaitUninterruptibly();
   } finally {
     channelFactory.releaseExternalResources();
   }
   LOG.info("web server stopped");
 }
Exemplo n.º 2
0
 public void stop() {
   try {
     for (ChannelFutureListener listener : closingListeners) {
       try {
         listener.operationComplete(null);
       } catch (Exception e) {
         LOG.error(e);
       }
     }
   } finally {
     try {
       openChannels.close().awaitUninterruptibly();
     } finally {
       channelFactory.releaseExternalResources();
     }
   }
 }