Class TrafficHttpHandler

java.lang.Object
ai.attackframework.tools.burp.sinks.TrafficHttpHandler
All Implemented Interfaces:
burp.api.montoya.http.handler.HttpHandler

public class TrafficHttpHandler extends Object
Shared Burp HTTP traffic handler for live request/response export.

This sink-neutral type is the canonical public entry point for the extension's shared HTTP traffic capture path. It keeps callers and user-facing docs on the neutral Traffic vocabulary while the larger implementation remains isolated in TrafficHttpHandlerSupport.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    Returns the current number of pending request/response orphan entries awaiting correlation or timeout-driven flush.
    burp.api.montoya.http.handler.RequestToBeSentAction
    handleHttpRequestToBeSent(burp.api.montoya.http.handler.HttpRequestToBeSent request)
     
    burp.api.montoya.http.handler.ResponseReceivedAction
    handleHttpResponseReceived(burp.api.montoya.http.handler.HttpResponseReceived response)
     
    static int
    Public accessor for the current pending-orphans size.
    static void
    Stops the orphan flush scheduler and clears tracked pending requests.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TrafficHttpHandler

      public TrafficHttpHandler()
  • Method Details

    • pendingOrphansSize

      public static int pendingOrphansSize()
      Public accessor for the current pending-orphans size. Delegates to TrafficHttpHandlerSupport.getPendingOrphansSize() so packages outside sinks (UI surfaces) can read the value.
    • stop

      public static void stop()
      Stops the orphan flush scheduler and clears tracked pending requests.

      Safe to call from any thread and safe to call more than once. The scheduler is recreated lazily on the next tracked request via LazyScheduler.getOrStart().

    • getPendingOrphansSize

      public static int getPendingOrphansSize()
      Returns the current number of pending request/response orphan entries awaiting correlation or timeout-driven flush. Used by Misc Stats and the periodic memory-sample log to detect unbounded orphan growth (a symptom of listener misbehavior or network stalls that keep responses from arriving within the orphan TTL).
    • handleHttpRequestToBeSent

      public burp.api.montoya.http.handler.RequestToBeSentAction handleHttpRequestToBeSent(burp.api.montoya.http.handler.HttpRequestToBeSent request)
      Specified by:
      handleHttpRequestToBeSent in interface burp.api.montoya.http.handler.HttpHandler
    • handleHttpResponseReceived

      public burp.api.montoya.http.handler.ResponseReceivedAction handleHttpResponseReceived(burp.api.montoya.http.handler.HttpResponseReceived response)
      Specified by:
      handleHttpResponseReceived in interface burp.api.montoya.http.handler.HttpHandler