code: public void setThreads(int min, int max) {
      QueuedThreadPool pool = (QueuedThreadPool) webServer.getThreadPool() ;
      pool.setMinThreads(min);
      pool.setMaxThreads(max);
    }
docs: Set the min, max number of worker threads (simultaneous connections).