private static final class IpSubnetFilterRule.Ip6SubnetFilterRule extends java.lang.Object implements IpFilterRule
| Modifier and Type | Field and Description |
|---|---|
private static java.math.BigInteger |
MINUS_ONE |
private java.math.BigInteger |
networkAddress |
private IpFilterRuleType |
ruleType |
private java.math.BigInteger |
subnetMask |
| Modifier | Constructor and Description |
|---|---|
private |
Ip6SubnetFilterRule(java.net.Inet6Address ipAddress,
int cidrPrefix,
IpFilterRuleType ruleType) |
| Modifier and Type | Method and Description |
|---|---|
private static java.math.BigInteger |
ipToInt(java.net.Inet6Address ipAddress) |
boolean |
matches(java.net.InetSocketAddress remoteAddress) |
private static java.math.BigInteger |
prefixToSubnetMask(int cidrPrefix) |
IpFilterRuleType |
ruleType() |
private static final java.math.BigInteger MINUS_ONE
private final java.math.BigInteger networkAddress
private final java.math.BigInteger subnetMask
private final IpFilterRuleType ruleType
private Ip6SubnetFilterRule(java.net.Inet6Address ipAddress,
int cidrPrefix,
IpFilterRuleType ruleType)
public boolean matches(java.net.InetSocketAddress remoteAddress)
matches in interface IpFilterRulepublic IpFilterRuleType ruleType()
ruleType in interface IpFilterRuleIpFilterRuleType.ACCEPT if all
IpFilterRule.matches(InetSocketAddress) for which IpFilterRule.matches(InetSocketAddress)
returns true should the accepted. If you want to exclude all of those IP addresses then
IpFilterRuleType.REJECT should be returned.private static java.math.BigInteger ipToInt(java.net.Inet6Address ipAddress)
private static java.math.BigInteger prefixToSubnetMask(int cidrPrefix)