Package org.jboss.netty.handler.ipfilter
Class IpSubnetFilterRule
java.lang.Object
org.jboss.netty.handler.ipfilter.IpSubnet
org.jboss.netty.handler.ipfilter.IpSubnetFilterRule
- All Implemented Interfaces:
Comparable<IpSubnet>
,IpFilterRule
,IpSet
Ip V4 and Ip V6 filter rule.
Note that mix of IPV4 and IPV6 is allowed but it is not recommended. So it is preferable to not mix IPV4 addresses with IPV6 rules, even if it should work.
Note that mix of IPV4 and IPV6 is allowed but it is not recommended. So it is preferable to not mix IPV4 addresses with IPV6 rules, even if it should work.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Is this IpV4Subnet an ALLOW or DENY rule -
Constructor Summary
ConstructorsConstructorDescriptionIpSubnetFilterRule
(boolean allow) Constructor for a ALLOW or DENY ALLIpSubnetFilterRule
(boolean allow, String netAddress) IpSubnetFilterRule
(boolean allow, InetAddress inetAddress, int cidrNetMask) IpSubnetFilterRule
(boolean allow, InetAddress inetAddress, String netMask) -
Method Summary
Methods inherited from class org.jboss.netty.handler.ipfilter.IpSubnet
compareTo, contains, contains, equals, hashCode, toString
-
Field Details
-
isAllowRule
private boolean isAllowRuleIs this IpV4Subnet an ALLOW or DENY rule
-
-
Constructor Details
-
IpSubnetFilterRule
public IpSubnetFilterRule(boolean allow) Constructor for a ALLOW or DENY ALL- Parameters:
allow
- True for ALLOW, False for DENY
-
IpSubnetFilterRule
public IpSubnetFilterRule(boolean allow, InetAddress inetAddress, int cidrNetMask) throws UnknownHostException - Parameters:
allow
- True for ALLOW, False for DENY- Throws:
UnknownHostException
-
IpSubnetFilterRule
public IpSubnetFilterRule(boolean allow, InetAddress inetAddress, String netMask) throws UnknownHostException - Parameters:
allow
- True for ALLOW, False for DENY- Throws:
UnknownHostException
-
IpSubnetFilterRule
- Parameters:
allow
- True for ALLOW, False for DENY- Throws:
UnknownHostException
-
-
Method Details
-
isAllowRule
public boolean isAllowRule()- Specified by:
isAllowRule
in interfaceIpFilterRule
- Returns:
- True if this Rule is an ALLOW rule
-
isDenyRule
public boolean isDenyRule()- Specified by:
isDenyRule
in interfaceIpFilterRule
- Returns:
- True if this Rule is a DENY rule
-