code: @Override
    public void close() {
  
      LOG.log(Level.FINE, "Closing netty transport socket address: {0}", this.localAddress);
  
      final ChannelGroupFuture clientChannelGroupFuture = this.clientChannelGroup.close();
      final ChannelGroupFuture serverChannelGroupFuture = this.serverChannelGroup.close();
      final ChannelFuture acceptorFuture = this.acceptor.close();
  
      final ArrayList<Future> eventLoopGroupFutures = new ArrayList<>(3);
      eventLoopGroupFutures.add(this.clientWorkerGroup.shutdownGracefully());
      eventLoopGroupFutures.add(this.serverBossGroup.shutdownGracefully());
      eventLoopGroupFutures.add(this.serverWorkerGroup.shutdownGracefully());
  
      clientChannelGroupFuture.awaitUninterruptibly();
      serverChannelGroupFuture.awaitUninterruptibly();
  
      try {
        acceptorFuture.sync();
      } catch (final Exception ex) {
        LOG.log(Level.SEVERE, "Error closing the acceptor channel for " + this.localAddress, ex);
      }
  
      for (final Future eventLoopGroupFuture : eventLoopGroupFutures) {
        eventLoopGroupFuture.awaitUninterruptibly();
      }
  
      LOG.log(Level.FINE, "Closing netty transport socket address: {0} done", this.localAddress);
    }
docs: Closes all channels and releases all resources.