Interface ResponseListener

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 interface ResponseListener
Observes every HTTP response the client receives, retried attempts included: for metrics, quota tracking (X-Tenant-RateLimit-*) or tests. It sees status and headers, never a body.

It runs on the HTTP client's thread before the call completes, so it should be quick and must be thread-safe. An exception it throws is ignored.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called once per response.
  • Method Details

    • onResponse

      void onResponse(ResponseInfo info)
      Called once per response.
      Parameters:
      info - the response's method, path, status, headers and attempt number