Top Description Methods
io.netty.handler.ipfilter

public Interface IpFilterRule

Known Direct Implementers
io.netty.handler.ipfilter.IpSubnetFilterRule, io.netty.handler.ipfilter.IpSubnetFilterRule.Ip4SubnetFilterRule, io.netty.handler.ipfilter.IpSubnetFilterRule.Ip6SubnetFilterRule
Imports
java.net.InetSocketAddress

Implement this interface to create new rules.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

This method should return true if remoteAddress is valid according to your criteria. False otherwise.
matches
(InetSocketAddress remoteAddress)

public IpFilterRuleType

Returns:

This method should return IpFilterRuleType#ACCEPT if all IpFilterRule#matches(InetSocketAddress) for which matches(InetSocketAddress) returns true should the accepted. If you want to exclude all of those IP addresses then IpFilterRuleType#REJECT should be returned.
ruleType
()

Method Detail

matchesback to summary
public boolean matches(InetSocketAddress remoteAddress)
Returns:boolean

This method should return true if remoteAddress is valid according to your criteria. False otherwise.

ruleTypeback to summary
public IpFilterRuleType ruleType()
Returns:IpFilterRuleType

This method should return IpFilterRuleType#ACCEPT if all IpFilterRule#matches(InetSocketAddress) for which matches(InetSocketAddress) returns true should the accepted. If you want to exclude all of those IP addresses then IpFilterRuleType#REJECT should be returned.