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
public class LocalHostMatcher extends InetHostMatcher
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 /.
[[examples=http_processors]]- localMatch pathRegex: /print/.+
-
-
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 Constructor Description LocalHostMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<InetHostMatcher.AddressMask>
createAuthorizedIPs()
Get the full list of authorized IP addresses and the masks.java.lang.String
toString()
void
validate(java.util.List<java.lang.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
-
-
-
-
Method Detail
-
createAuthorizedIPs
protected final java.util.List<InetHostMatcher.AddressMask> createAuthorizedIPs() throws java.net.SocketException
Description copied from class:InetHostMatcher
Get the full list of authorized IP addresses and the masks.- Specified by:
createAuthorizedIPs
in classInetHostMatcher
- Throws:
java.net.SocketException
-
validate
public final void validate(java.util.List<java.lang.Throwable> validationErrors, Configuration configuration)
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
public final java.lang.String toString()
- Specified by:
toString
in classHostMatcher
-
-