Class HttpRequestFetcher

java.lang.Object
org.mapfish.print.http.HttpRequestFetcher

public final class HttpRequestFetcher extends Object
Schedule tasks for caching Http Requests that can be run simultaneously.

The instances of the returned request will use a future to wait for the actual request to be really completed.

  • Constructor Details

    • HttpRequestFetcher

      public HttpRequestFetcher(File temporaryDirectory, com.codahale.metrics.MetricRegistry registry, Processor.ExecutionContext context, ForkJoinPool requestForkJoinPool)
      Constructor.
      Parameters:
      temporaryDirectory - temporary directory for cached requests
      registry - the metric registry
      context - the job ID
      requestForkJoinPool - the work pool to use to do the requests
  • Method Details

    • register

      public org.springframework.http.client.ClientHttpRequest register(org.springframework.http.client.ClientHttpRequest originalRequest)
      Register a http request for caching. Returns a handle to the HttpRequest that will be cached.
      Parameters:
      originalRequest - the original request
      Returns:
      the cached http request