Interface ResourcePool


public interface ResourcePool
The resource pool a RequestExecutionEngine run draws on for concurrency, throttle and retries. Pass it to RequestEngineOptions.withResourcePool(ResourcePool). Obtain one of three ways:

The latter two reference pools whose settings are owned by Burp, so they are immutable: calling a withX method on them throws IllegalStateException.

  • Method Summary

    Modifier and Type
    Method
    Description
    Use Burp's shared default resource pool as-is.
    Use a resource pool the user has already configured in Burp, identified by name, sharing its capacity with every other task assigned to it.
    Obtain a new private, tunable resource pool at the default settings (concurrent request limit of 10, no throttle, no retries).
    withConcurrentRequestLimit(int concurrentRequestLimit)
    Set the maximum number of requests sent concurrently from this pool.
    withMaxRetries(int maxRetries)
    Set the number of times a connection-level failure is retried before the request is recorded as failed.
    Set a fixed delay between consecutive requests across the run, capping the overall send rate regardless of concurrency.
  • Method Details

    • withConcurrentRequestLimit

      ResourcePool withConcurrentRequestLimit(int concurrentRequestLimit)
      Set the maximum number of requests sent concurrently from this pool.
      Parameters:
      concurrentRequestLimit - The maximum number of in-flight requests (in the range 1 to 999).
      Returns:
      resource pool
      Throws:
      IllegalArgumentException - if concurrentRequestLimit is outside the range 1 to 999.
    • withThrottle

      ResourcePool withThrottle(Duration delay)
      Set a fixed delay between consecutive requests across the run, capping the overall send rate regardless of concurrency.
      Parameters:
      delay - The delay between requests. Duration.ZERO disables throttling.
      Returns:
      resource pool
      Throws:
      IllegalArgumentException - if delay is null or negative.
    • withMaxRetries

      ResourcePool withMaxRetries(int maxRetries)
      Set the number of times a connection-level failure is retried before the request is recorded as failed. Only transport-level failures are retried; an HTTP 4xx or 5xx response is a RequestStatus.RESPONDED answer and is never retried.
      Parameters:
      maxRetries - The maximum number of retries per request (zero or more).
      Returns:
      resource pool
      Throws:
      IllegalArgumentException - if maxRetries is negative.
    • resourcePool

      static ResourcePool resourcePool()
      Obtain a new private, tunable resource pool at the default settings (concurrent request limit of 10, no throttle, no retries).
      Returns:
      resource pool
    • defaultResourcePool

      static ResourcePool defaultResourcePool()
      Use Burp's shared default resource pool as-is. The returned pool is immutable - its withX methods throw IllegalStateException.
      Returns:
      resource pool
    • existingResourcePool

      static ResourcePool existingResourcePool(String name)
      Use a resource pool the user has already configured in Burp, identified by name, sharing its capacity with every other task assigned to it. The returned pool is immutable - its withX methods throw IllegalStateException - and the run fails to start if no pool with that name exists.
      Parameters:
      name - The name of the existing resource pool.
      Returns:
      resource pool