Package org.mapfish.print.processor.http
Class UseHttpForHttpsProcessor
java.lang.Object
org.mapfish.print.processor.AbstractProcessor<ClientHttpFactoryProcessorParam,Void>
org.mapfish.print.processor.http.AbstractClientHttpRequestFactoryProcessor
org.mapfish.print.processor.http.UseHttpForHttpsProcessor
- All Implemented Interfaces:
ConfigurationObject,HttpProcessor<ClientHttpFactoryProcessorParam>,Processor<ClientHttpFactoryProcessorParam,Void>
This processor maps https requests to http requests for certain hosts. The port number can also
be mapped since that is usually required.
Example:
- !useHttpForHttps
hosts: [localhost, www.camptocamp.com]
portMapping:
443: 80
8443: 8080
Can be applied conditionally using matchers, like in RestrictUrisProcessor (!restrictUris ). [[examples=http_processors]]
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mapfish.print.processor.AbstractProcessor
AbstractProcessor.ContextNested classes/interfaces inherited from interface org.mapfish.print.processor.Processor
Processor.ExecutionContext -
Field Summary
Fields inherited from class org.mapfish.print.processor.http.AbstractClientHttpRequestFactoryProcessor
matchersFields inherited from interface org.mapfish.print.processor.Processor
MDC_APPLICATION_ID_KEY, MDC_JOB_ID_KEY -
Method Summary
Modifier and TypeMethodDescriptioncreateFactoryWrapper(ClientHttpFactoryProcessorParam clientHttpFactoryProcessorParam, MfClientHttpRequestFactory requestFactory) Create theMfClientHttpRequestFactoryto use.protected voidextraValidation(List<Throwable> validationErrors, Configuration configuration) Perform any extra validation a subclass may need to perform.voidSet the patterns to use for selecting the hosts to apply the https -> http mapping to.voidsetPortMapping(Map<Integer, Integer> portMapping) Set the https port to http port mapping.Methods inherited from class org.mapfish.print.processor.http.AbstractClientHttpRequestFactoryProcessor
createInputParameter, execute, setMatchersMethods inherited from class org.mapfish.print.processor.AbstractProcessor
getInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputType, setInputMapper, setInputPrefix, setOutputMapper, setOutputPrefix, setPrefix, toString, toString, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.mapfish.print.config.ConfigurationObject
validateMethods inherited from interface org.mapfish.print.processor.Processor
getInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputType, toString
-
Method Details
-
extraValidation
Description copied from class:AbstractProcessorPerform any extra validation a subclass may need to perform.- Overrides:
extraValidationin classAbstractClientHttpRequestFactoryProcessor- Parameters:
validationErrors- a list to add errors to so that all validation errors are reported as one.configuration- the containing configuration
-
createFactoryWrapper
public MfClientHttpRequestFactory createFactoryWrapper(ClientHttpFactoryProcessorParam clientHttpFactoryProcessorParam, MfClientHttpRequestFactory requestFactory) Description copied from interface:HttpProcessorCreate theMfClientHttpRequestFactoryto use.- Parameters:
clientHttpFactoryProcessorParam- extra parameters required to create the updated request factoryrequestFactory- the basic request factory. It should be unmodified and just wrapped with a proxy class.
-
setPortMapping
Set the https port to http port mapping.- Parameters:
portMapping- the mappings to add.
-
setHosts
Set the patterns to use for selecting the hosts to apply the https -> http mapping to.- If the host starts and ends with / then it is compiled as a regular expression
- Otherwise the hosts must exactly match
- Parameters:
hosts- hosts to match. Can be regular expressions
-