code: @Override
    public void process(final SelectionKey key) {
      try {
        final ServerSocketChannel serverChannel = (ServerSocketChannel) key.channel();
  
        if (serverChannel.isOpen()) {
          final SocketChannel clientChannel = serverChannel.accept();
  
          if (clientChannel != null) {
            clientChannel.configureBlocking(false);
  
            clientChannel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE, new Context(clientChannel));
          }
        }
      } catch (Exception e) {
        final String message = "Failed to accept client socket for " + name + " because: " + e.getMessage();
        logger().log(message, e);
        throw new IllegalArgumentException(message);
      }
    }
docs: =========================================