public class RuleBasedIpFilter extends Object implements IpFilterRule
RuleBasedIpFilter| 构造器和说明 |
|---|
RuleBasedIpFilter(List<IpRange> ips,
IpFilterRuleType ipFilterRuleType) |
public RuleBasedIpFilter(List<IpRange> ips, IpFilterRuleType ipFilterRuleType)
public boolean matches(InetSocketAddress remoteAddress)
IpFilterRulematches 在接口中 IpFilterRuleremoteAddress - 远程地址public IpFilterRuleType ruleType()
ruleType 在接口中 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 © 2021. All rights reserved.