public abstract class InetHostMatcher extends HostMatcher
| Modifier and Type | Field and Description |
|---|---|
protected byte[][] |
authorizedIPs
The ip addresses that are considered legal.
|
pathRegex, port| Constructor and Description |
|---|
InetHostMatcher() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[][] |
buildMaskedAuthorizedIPs(java.net.InetAddress[] ips)
calculate the authorized Ip addresses and assign them to the field.
|
boolean |
equals(java.lang.Object obj) |
protected abstract byte[][] |
getAuthorizedIPs(java.net.InetAddress mask)
Get the full list of authorized IP addresses for the provided mask.
|
protected abstract java.net.InetAddress |
getMaskAddress()
Get the mask IP address.
|
int |
hashCode() |
protected com.google.common.base.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.
|
accepts, setPathRegex, setPort, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitvalidateprotected byte[][] authorizedIPs
protected final com.google.common.base.Optional<java.lang.Boolean> tryOverrideValidation(MatchInfo matchInfo) throws java.net.UnknownHostException, java.net.SocketException
HostMatchertryOverrideValidation in class HostMatchermatchInfo - the match information to validate.java.net.UnknownHostExceptionjava.net.SocketExceptionprotected abstract java.net.InetAddress getMaskAddress()
throws java.net.UnknownHostException
java.net.UnknownHostExceptionprotected final byte[][] buildMaskedAuthorizedIPs(java.net.InetAddress[] ips)
throws java.net.UnknownHostException
ips - the addresses get the IP addresses from.java.net.UnknownHostExceptionprotected abstract byte[][] getAuthorizedIPs(java.net.InetAddress mask)
throws java.net.UnknownHostException,
java.net.SocketException
mask - the mask addressjava.net.UnknownHostExceptionjava.net.SocketExceptionpublic int hashCode()
hashCode in class HostMatcherpublic boolean equals(java.lang.Object obj)
equals in class HostMatcher