Package org.mapfish.print.http
Class HttpRequestFetcher
java.lang.Object
org.mapfish.print.http.HttpRequestFetcher
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
ConstructorsConstructorDescriptionHttpRequestFetcher
(File temporaryDirectory, com.codahale.metrics.MetricRegistry registry, Processor.ExecutionContext context, ForkJoinPool requestForkJoinPool) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpRequest
register
(org.springframework.http.client.ClientHttpRequest originalRequest) Register a http request for caching.
-
Constructor Details
-
HttpRequestFetcher
public HttpRequestFetcher(File temporaryDirectory, com.codahale.metrics.MetricRegistry registry, Processor.ExecutionContext context, 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 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
-