RuleBasedIpFilter that group IP addresses into subnets.
Supports both, IPv4 and IPv6.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final IpFilterRule | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(IpSubnetFilterRule
the object to be compared. ipSubnetFilterRule)Implements java. |
| pack-priv int | Returns: 0 if IP Address match else difference index.InetSocketAddress to matchImplements java. Ip4SubnetFilterRule#networkAddress or
Ip6SubnetFilterRule#networkAddress.
|
| pack-priv IpFilterRule | |
| pack-priv String | |
| public boolean | |
| public IpFilterRuleType | |
| private static IpFilterRule |
| filterRule | back to summary |
|---|---|
| private final IpFilterRule filterRule | |
| ipAddress | back to summary |
|---|---|
| private final String ipAddress | |
| IpSubnetFilterRule | back to summary |
|---|---|
| public IpSubnetFilterRule(String ipAddress, int cidrPrefix, IpFilterRuleType ruleType) | |
| IpSubnetFilterRule | back to summary |
|---|---|
| public IpSubnetFilterRule(InetAddress ipAddress, int cidrPrefix, IpFilterRuleType ruleType) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(IpSubnetFilterRule ipSubnetFilterRule) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compareTo | back to summary |
|---|---|
| pack-priv int compareTo(InetSocketAddress inetSocketAddress) Implements java. It'll compare IP address with
| |
| getFilterRule | back to summary |
|---|---|
| pack-priv IpFilterRule getFilterRule() | |
| getIpAddress | back to summary |
|---|---|
| pack-priv String getIpAddress() Get IP Address of this rule | |
| matches | back to summary |
|---|---|
| public boolean matches(InetSocketAddress remoteAddress) Implements io.
| |
| ruleType | back to summary |
|---|---|
| public IpFilterRuleType ruleType() Implements io.
| |
| selectFilterRule | back to summary |
|---|---|
| private static IpFilterRule selectFilterRule(InetAddress ipAddress, int cidrPrefix, IpFilterRuleType ruleType) | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final IpFilterRuleType | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| private static int | |
| public IpFilterRuleType |
| networkAddress | back to summary |
|---|---|
| private final int networkAddress | |
| ruleType | back to summary |
|---|---|
| private final IpFilterRuleType ruleType | |
| subnetMask | back to summary |
|---|---|
| private final int subnetMask | |
| Ip4SubnetFilterRule | back to summary |
|---|---|
| private Ip4SubnetFilterRule(Inet4Address ipAddress, int cidrPrefix, IpFilterRuleType ruleType) | |
| matches | back to summary |
|---|---|
| public boolean matches(InetSocketAddress remoteAddress) Implements io.
| |
| prefixToSubnetMask | back to summary |
|---|---|
| private static int prefixToSubnetMask(int cidrPrefix) | |
| ruleType | back to summary |
|---|---|
| public IpFilterRuleType ruleType() Implements io.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final BigInteger | |
| private final BigInteger | |
| private final IpFilterRuleType | |
| private final BigInteger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static BigInteger | |
| public boolean | |
| private static BigInteger | |
| public IpFilterRuleType |
| MINUS_ONE | back to summary |
|---|---|
| private static final BigInteger MINUS_ONE | |
| networkAddress | back to summary |
|---|---|
| private final BigInteger networkAddress | |
| ruleType | back to summary |
|---|---|
| private final IpFilterRuleType ruleType | |
| subnetMask | back to summary |
|---|---|
| private final BigInteger subnetMask | |
| Ip6SubnetFilterRule | back to summary |
|---|---|
| private Ip6SubnetFilterRule(Inet6Address ipAddress, int cidrPrefix, IpFilterRuleType ruleType) | |
| ipToInt | back to summary |
|---|---|
| private static BigInteger ipToInt(Inet6Address ipAddress) | |
| matches | back to summary |
|---|---|
| public boolean matches(InetSocketAddress remoteAddress) Implements io.
| |
| prefixToSubnetMask | back to summary |
|---|---|
| private static BigInteger prefixToSubnetMask(int cidrPrefix) | |
| ruleType | back to summary |
|---|---|
| public IpFilterRuleType ruleType() Implements io.
| |