public final class RestrictUrisProcessor extends AbstractClientHttpRequestFactoryProcessor
Usage of processor is as follows:
- !restrictUris
matchers:
- !localMatch {}
- !ipMatch
ip: www.camptocamp.org
- !dnsMatch
host: mapfish-geoportal.demo-camptocamp.com
port: 80
- !dnsMatch
host: labs.metacarta.com
port: 80
- !dnsMatch
host: terraservice.net
port: 80
- !dnsMatch
host: tile.openstreetmap.org
port: 80
- !dnsMatch
host: www.geocat.ch
port: 80
Note: if this class is part of a CompositeClientHttpRequestFactoryProcessor (!configureHttpRequests) then it should be the last one so that the checks are done after all changes to the URIs
AbstractProcessor.ContextProcessor.ExecutionContext| Constructor and Description |
|---|
RestrictUrisProcessor() |
| Modifier and Type | Method and Description |
|---|---|
MfClientHttpRequestFactory |
createFactoryWrapper(ClientHttpFactoryProcessorParam clientHttpFactoryProcessorParam,
MfClientHttpRequestFactory requestFactory)
Create the
MfClientHttpRequestFactory to use. |
protected void |
extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
Perform any extra validation a subclass may need to perform.
|
void |
setMatchers(java.util.List<? extends HostMatcher> matchers)
The matchers used to select the legal urls.
|
createInputParameter, executecheckCancelState, getInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputType, setInputMapper, setInputPrefix, setOutputMapper, setOutputPrefix, setPrefix, toString, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInputMapperBiMap, getInputPrefix, getOutputMapperBiMap, getOutputPrefix, getOutputTypevalidatepublic void setMatchers(java.util.List<? extends HostMatcher> matchers)
- !restrictUris
matchers:
- !localMatch
dummy: true
- !ipMatch
ip: www.camptocamp.org
- !dnsMatch
host: mapfish-geoportal.demo-camptocamp.com
port: 80
- !dnsMatch
host: labs.metacarta.com
port: 80
- !dnsMatch
host: terraservice.net
port: 80
- !dnsMatch
host: tile.openstreetmap.org
port: 80
- !dnsMatch
host: www.geocat.ch
port: 80
matchers - the list of matcher to use to check if a url is permittedprotected void extraValidation(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
AbstractProcessorextraValidation in class AbstractProcessor<ClientHttpFactoryProcessorParam,ClientHttpFactoryProcessorParam>validationErrors - a list to add errors to so that all validation errors are reported as one.configuration - the containing configurationpublic MfClientHttpRequestFactory createFactoryWrapper(ClientHttpFactoryProcessorParam clientHttpFactoryProcessorParam, MfClientHttpRequestFactory requestFactory)
HttpProcessorMfClientHttpRequestFactory to use.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.