Class InetHostMatcher
- java.lang.Object
-
- org.mapfish.print.processor.http.matcher.AbstractMatcher
-
- org.mapfish.print.processor.http.matcher.HostMatcher
-
- org.mapfish.print.processor.http.matcher.InetHostMatcher
-
- All Implemented Interfaces:
ConfigurationObject
,URIMatcher
- Direct Known Subclasses:
AddressHostMatcher
,LocalHostMatcher
public abstract class InetHostMatcher extends HostMatcher
Allows to check that a given URL matches an IP address (numeric format).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
InetHostMatcher.AddressMask
The ip addresses that are considered legal.
-
Field Summary
-
Fields inherited from class org.mapfish.print.processor.http.matcher.HostMatcher
pathRegex, port
-
-
Constructor Summary
Constructors Constructor Description InetHostMatcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
clearAuthorizedIPs()
Reset the authorized IPs cache.protected abstract java.util.List<InetHostMatcher.AddressMask>
createAuthorizedIPs()
Get the full list of authorized IP addresses and the masks.boolean
equals(java.lang.Object obj)
int
hashCode()
protected java.util.Optional<java.lang.Boolean>
tryOverrideValidation(MatchInfo matchInfo)
If the subclass has its own checks or if it has a different validation method this method can return a valid value.-
Methods inherited from class org.mapfish.print.processor.http.matcher.HostMatcher
matches, setPathRegex, setPort, toString
-
Methods inherited from class org.mapfish.print.processor.http.matcher.AbstractMatcher
isReject, setReject
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mapfish.print.config.ConfigurationObject
validate
-
-
-
-
Method Detail
-
tryOverrideValidation
protected final java.util.Optional<java.lang.Boolean> tryOverrideValidation(MatchInfo matchInfo) throws java.net.UnknownHostException, java.net.SocketException
Description copied from class:HostMatcher
If the subclass has its own checks or if it has a different validation method this method can return a valid value.- Specified by:
tryOverrideValidation
in classHostMatcher
- Parameters:
matchInfo
- the match information to validate.- Throws:
java.net.UnknownHostException
java.net.SocketException
-
createAuthorizedIPs
protected abstract java.util.List<InetHostMatcher.AddressMask> createAuthorizedIPs() throws java.net.UnknownHostException, java.net.SocketException
Get the full list of authorized IP addresses and the masks.- Throws:
java.net.UnknownHostException
java.net.SocketException
-
clearAuthorizedIPs
protected final void clearAuthorizedIPs()
Reset the authorized IPs cache.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classHostMatcher
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classHostMatcher
-
-