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