public class PatternRule extends Object implements io.netty.handler.ipfilter.IpFilterRule
Rule ::= [n|i]:address n stands for computer name, i for ip address address ::= <regex> | localhost regex is a regular expression with '*' as multi character and '?' as single character wild card
For some reason Netty 4 didn't copy this from Netty 3. The code was copied from the Netty 3 PatternRule and modifed as required to match the new version of IpFilterRule.
Constructor and Description |
---|
PatternRule(io.netty.handler.ipfilter.IpFilterRuleType ruleType,
String pattern)
Construct the IpFilterRule from a pattern.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(InetSocketAddress inetSocketAddress) |
io.netty.handler.ipfilter.IpFilterRuleType |
ruleType() |
public PatternRule(io.netty.handler.ipfilter.IpFilterRuleType ruleType, String pattern)
ruleType
- The RuleType (accept or deny)pattern
- The pattern.public boolean matches(InetSocketAddress inetSocketAddress)
matches
in interface io.netty.handler.ipfilter.IpFilterRule
public io.netty.handler.ipfilter.IpFilterRuleType ruleType()
ruleType
in interface io.netty.handler.ipfilter.IpFilterRule
Copyright © 2009-2022 Apache Software Foundation. All Rights Reserved.