Package org.mapfish.print.http
Class HttpRequestFetcher
- java.lang.Object
-
- org.mapfish.print.http.HttpRequestFetcher
-
public final class HttpRequestFetcher extends java.lang.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 Summary
Constructors Constructor Description HttpRequestFetcher(java.io.File temporaryDirectory, com.codahale.metrics.MetricRegistry registry, Processor.ExecutionContext context, java.util.concurrent.ForkJoinPool requestForkJoinPool)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.client.ClientHttpRequest
register(org.springframework.http.client.ClientHttpRequest originalRequest)
Register a http request for caching.
-
-
-
Constructor Detail
-
HttpRequestFetcher
public HttpRequestFetcher(java.io.File temporaryDirectory, com.codahale.metrics.MetricRegistry registry, Processor.ExecutionContext context, java.util.concurrent.ForkJoinPool requestForkJoinPool)
Constructor.- Parameters:
temporaryDirectory
- temporary directory for cached requestsregistry
- the metric registrycontext
- the job IDrequestForkJoinPool
- the work pool to use to do the requests
-
-
Method Detail
-
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
-
-