Class LocalHostMatcher
java.lang.Object
org.mapfish.print.processor.http.matcher.AbstractMatcher
org.mapfish.print.processor.http.matcher.HostMatcher
org.mapfish.print.processor.http.matcher.InetHostMatcher
org.mapfish.print.processor.http.matcher.LocalHostMatcher
- All Implemented Interfaces:
ConfigurationObject
,URIMatcher
Allows to check that a given URL is served by one of the local network interface or one of its
aliases.
Example 1: Accept any localhost url
- localMatch {}
Example 2: Accept any localhost url (port == -1 accepts any port)
- localMatch
port: -1
Example 3: Accept any localhost url on port 80 only
- localMatch
port: 80
Example 4: Accept localhost urls with paths that start with /print/.
If the regular expression given does not start with / then it will be added because all paths start with /.
- localMatch
pathRegex: /print/.+
[[examples=http_processors]]-
Nested Class Summary
Nested classes/interfaces inherited from class org.mapfish.print.processor.http.matcher.InetHostMatcher
InetHostMatcher.AddressMask
-
Field Summary
Fields inherited from class org.mapfish.print.processor.http.matcher.HostMatcher
pathRegex, port
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final List<InetHostMatcher.AddressMask>
Get the full list of authorized IP addresses and the masks.final String
toString()
final void
validate
(List<Throwable> validationErrors, Configuration configuration) validate that the configuration was correct.Methods inherited from class org.mapfish.print.processor.http.matcher.InetHostMatcher
clearAuthorizedIPs, equals, hashCode, tryOverrideValidation
Methods inherited from class org.mapfish.print.processor.http.matcher.HostMatcher
matches, setPathRegex, setPort
Methods inherited from class org.mapfish.print.processor.http.matcher.AbstractMatcher
isReject, setReject
-
Constructor Details
-
LocalHostMatcher
public LocalHostMatcher()
-
-
Method Details
-
createAuthorizedIPs
Description copied from class:InetHostMatcher
Get the full list of authorized IP addresses and the masks.- Specified by:
createAuthorizedIPs
in classInetHostMatcher
- Throws:
SocketException
-
validate
Description copied from interface:ConfigurationObject
validate that the configuration was correct.- Parameters:
validationErrors
- a list to add any detected errors to.configuration
- the containing configuration
-
toString
- Specified by:
toString
in classHostMatcher
-