code: @NullSafe
    protected boolean isRunning(ServerSocket serverSocket) {
      return Optional.ofNullable(serverSocket)
        .map(localServerSocket -> !localServerSocket.isClosed() && localServerSocket.isBound())
        .orElse(false);
    }
docs: Determines whether the {@link ServerSocket} is alive and accepting client connections.
  
  @param serverSocket {@link ServerSocket} to evaluate.
  @return a boolean value indicating whether the {@link ServerSocket} is valid.
  @see java.net.ServerSocket#isBound()
  @see java.net.ServerSocket#isClosed()