Interface ConcurrencyLimiter.Responder

Enclosing class:
ConcurrencyLimiter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ConcurrencyLimiter.Responder
Makes the answer to a refused request; null sends the default 429.
  • Method Details

    • respond

      HttpResponse respond(String key, HttpRequest request, FlowContext flow)
      Creates the HTTP response for a refused request.
      Parameters:
      key - the concurrency group key that exceeded its limit
      request - the request being handled
      flow - the client connection or exchange context
      Returns:
      the rejection response, or null for the default 429