HostPort Class — netty Architecture
Architecture documentation for the HostPort class in QuicClientSessionCache.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9["HostPort"] fe0b2fa3_d404_54d8_3cec_bb7bbf163445["QuicClientSessionCache.java"] 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9 -->|defined in| fe0b2fa3_d404_54d8_3cec_bb7bbf163445 20350d6e_c962_de2d_ca2e_55c95630c551["HostPort()"] 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9 -->|method| 20350d6e_c962_de2d_ca2e_55c95630c551 5b438dfc_789c_9464_139c_c5e5ca3304d0["hashCode()"] 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9 -->|method| 5b438dfc_789c_9464_139c_c5e5ca3304d0 b42d8c1a_672f_ebbd_7a96_608f82785513["equals()"] 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9 -->|method| b42d8c1a_672f_ebbd_7a96_608f82785513 3b9e3845_c722_d942_2d6f_5ffa5edefdbe["String()"] 74f9b5d5_b2e0_4b42_1812_1f4fa50376e9 -->|method| 3b9e3845_c722_d942_2d6f_5ffa5edefdbe
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java lines 212–245
private static final class HostPort {
private final int hash;
private final String host;
private final int port;
HostPort(@Nullable String host, int port) {
this.host = host;
this.port = port;
// Calculate a hashCode that does ignore case.
this.hash = 31 * AsciiString.hashCode(host) + port;
}
@Override
public int hashCode() {
return hash;
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof HostPort)) {
return false;
}
HostPort other = (HostPort) obj;
return port == other.port && host.equalsIgnoreCase(other.host);
}
@Override
public String toString() {
return "HostPort{" +
"host='" + host + '\'' +
", port=" + port +
'}';
}
}
Source
Frequently Asked Questions
What is the HostPort class?
HostPort is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java.
Where is HostPort defined?
HostPort is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java at line 212.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free