Home / Function/ IpSubnetFilterRule() — netty Function Reference

IpSubnetFilterRule() — netty Function Reference

Architecture documentation for the IpSubnetFilterRule() function in IpSubnetFilterRule.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cfd105c1_5e22_3655_bdaa_174dc8af73c3["IpSubnetFilterRule()"]
  f3ff08cb_4fe1_1314_ac18_a2892f03b352["IpSubnetFilterRule"]
  cfd105c1_5e22_3655_bdaa_174dc8af73c3 -->|defined in| f3ff08cb_4fe1_1314_ac18_a2892f03b352
  style cfd105c1_5e22_3655_bdaa_174dc8af73c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ipfilter/IpSubnetFilterRule.java lines 44–58

    public IpSubnetFilterRule(String ipAddressWithCidr, IpFilterRuleType ruleType) {
        try {
            String[] ipAndCidr = ipAddressWithCidr.split("/");
            if (ipAndCidr.length != 2) {
                throw new IllegalArgumentException("ipAddressWithCidr: " + ipAddressWithCidr +
                        " (expected: \"<ip-address>/<mask-size>\")");
            }

            ipAddress = ipAndCidr[0];
            int cidrPrefix = Integer.parseInt(ipAndCidr[1]);
            filterRule = selectFilterRule(SocketUtils.addressByName(ipAddress), cidrPrefix, ruleType);
        } catch (UnknownHostException e) {
            throw new IllegalArgumentException("ipAddressWithCidr", e);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does IpSubnetFilterRule() do?
IpSubnetFilterRule() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ipfilter/IpSubnetFilterRule.java.
Where is IpSubnetFilterRule() defined?
IpSubnetFilterRule() is defined in handler/src/main/java/io/netty/handler/ipfilter/IpSubnetFilterRule.java at line 44.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free