public final class IpSubnetFilterRule extends java.lang.Object implements IpFilterRule
RuleBasedIpFilter that group IP addresses into subnets.
Supports both, IPv4 and IPv6.| Constructor and Description |
|---|
IpSubnetFilterRule(java.net.InetAddress ipAddress,
int cidrPrefix,
IpFilterRuleType ruleType) |
IpSubnetFilterRule(java.lang.String ipAddress,
int cidrPrefix,
IpFilterRuleType ruleType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(java.net.InetSocketAddress remoteAddress) |
IpFilterRuleType |
ruleType() |
public IpSubnetFilterRule(java.lang.String ipAddress,
int cidrPrefix,
IpFilterRuleType ruleType)
public IpSubnetFilterRule(java.net.InetAddress 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.Copyright © 2008–2018 The Netty Project. All rights reserved.