Package org.mapfish.print.http
Class ConfigFileResolvingHttpRequestFactory
java.lang.Object
org.mapfish.print.http.ConfigFileResolvingHttpRequestFactory
- All Implemented Interfaces:
MfClientHttpRequestFactory
,org.springframework.http.client.ClientHttpRequestFactory
public final class ConfigFileResolvingHttpRequestFactory
extends Object
implements MfClientHttpRequestFactory
This request factory will attempt to load resources using
Configuration.loadFile(String)
and Configuration.isAccessible(String)
to load the resources if the http
method is GET and will fall back to the normal/wrapped factory to make http requests.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapfish.print.http.MfClientHttpRequestFactory
MfClientHttpRequestFactory.RequestConfigurator
-
Constructor Summary
ConstructorsConstructorDescriptionConfigFileResolvingHttpRequestFactory
(MfClientHttpRequestFactoryImpl httpRequestFactory, Configuration config, Map<String, String> mdcContext, int httpRequestMaxNumberFetchRetry, int httpRequestFetchRetryIntervalMillis) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpRequest
createRequest
(URI uri, org.springframework.http.HttpMethod httpMethod) int
int
void
Register a callback for config using a http request.
-
Constructor Details
-
ConfigFileResolvingHttpRequestFactory
public ConfigFileResolvingHttpRequestFactory(MfClientHttpRequestFactoryImpl httpRequestFactory, Configuration config, @Nonnull Map<String, String> mdcContext, int httpRequestMaxNumberFetchRetry, int httpRequestFetchRetryIntervalMillis) Constructor.- Parameters:
httpRequestFactory
- basic request factoryconfig
- the template for the current print job.mdcContext
- the mdc context for the current print job.
-
-
Method Details
-
register
Description copied from interface:MfClientHttpRequestFactory
Register a callback for config using a http request.- Specified by:
register
in interfaceMfClientHttpRequestFactory
- Parameters:
callback
- the configuration callback
-
createRequest
@Nonnull public org.springframework.http.client.ClientHttpRequest createRequest(@Nonnull URI uri, @Nonnull org.springframework.http.HttpMethod httpMethod) - Specified by:
createRequest
in interfaceorg.springframework.http.client.ClientHttpRequestFactory
-
getHttpRequestFactory
-
getMdcContext
-
getConfig
-
getHttpRequestMaxNumberFetchRetry
public int getHttpRequestMaxNumberFetchRetry() -
getHttpRequestFetchRetryIntervalMillis
public int getHttpRequestFetchRetryIntervalMillis() -
getCallbacks
-