Class BoundedAsyncRunner

java.lang.Object
burp.mcp.server.BoundedAsyncRunner
All Implemented Interfaces:
fi.iki.elonen.NanoHTTPD.AsyncRunner

public class BoundedAsyncRunner extends Object implements fi.iki.elonen.NanoHTTPD.AsyncRunner
Bounded AsyncRunner honoring the thread_pool_size and max_queue_size preferences. The default NanoHTTPD runner spawns an unbounded thread per connection. This runner caps both threads and queued connections; when saturated it closes the excess connection instead of growing without bound.
  • Constructor Details

    • BoundedAsyncRunner

      public BoundedAsyncRunner(int threads, int queueSize)
  • Method Details

    • exec

      public void exec(fi.iki.elonen.NanoHTTPD.ClientHandler clientHandler)
      Specified by:
      exec in interface fi.iki.elonen.NanoHTTPD.AsyncRunner
    • closed

      public void closed(fi.iki.elonen.NanoHTTPD.ClientHandler clientHandler)
      Specified by:
      closed in interface fi.iki.elonen.NanoHTTPD.AsyncRunner
    • closeAll

      public void closeAll()
      Specified by:
      closeAll in interface fi.iki.elonen.NanoHTTPD.AsyncRunner
    • getRejectedCount

      public long getRejectedCount()
      Connections dropped because pool + queue were full.
    • shutdown

      public void shutdown()