HAProxyProxiedProtocol Type — netty Architecture
Architecture documentation for the HAProxyProxiedProtocol type/interface in HAProxyProxiedProtocol.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 18025899_bc32_35aa_d568_1ce687d16983["HAProxyProxiedProtocol"] 0efc4e1b_d36e_10e2_7949_06352f7fb11d["HAProxyProxiedProtocol.java"] 18025899_bc32_35aa_d568_1ce687d16983 -->|defined in| 0efc4e1b_d36e_10e2_7949_06352f7fb11d style 18025899_bc32_35aa_d568_1ce687d16983 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyProxiedProtocol.java lines 23–239
public enum HAProxyProxiedProtocol {
/**
* The UNKNOWN represents a connection which was forwarded for an unknown protocol and an unknown address family.
*/
UNKNOWN(TPAF_UNKNOWN_BYTE, AddressFamily.AF_UNSPEC, TransportProtocol.UNSPEC),
/**
* The TCP4 represents a connection which was forwarded for an IPv4 client over TCP.
*/
TCP4(TPAF_TCP4_BYTE, AddressFamily.AF_IPv4, TransportProtocol.STREAM),
/**
* The TCP6 represents a connection which was forwarded for an IPv6 client over TCP.
*/
TCP6(TPAF_TCP6_BYTE, AddressFamily.AF_IPv6, TransportProtocol.STREAM),
/**
* The UDP4 represents a connection which was forwarded for an IPv4 client over UDP.
*/
UDP4(TPAF_UDP4_BYTE, AddressFamily.AF_IPv4, TransportProtocol.DGRAM),
/**
* The UDP6 represents a connection which was forwarded for an IPv6 client over UDP.
*/
UDP6(TPAF_UDP6_BYTE, AddressFamily.AF_IPv6, TransportProtocol.DGRAM),
/**
* The UNIX_STREAM represents a connection which was forwarded for a UNIX stream socket.
*/
UNIX_STREAM(TPAF_UNIX_STREAM_BYTE, AddressFamily.AF_UNIX, TransportProtocol.STREAM),
/**
* The UNIX_DGRAM represents a connection which was forwarded for a UNIX datagram socket.
*/
UNIX_DGRAM(TPAF_UNIX_DGRAM_BYTE, AddressFamily.AF_UNIX, TransportProtocol.DGRAM);
private final byte byteValue;
private final AddressFamily addressFamily;
private final TransportProtocol transportProtocol;
/**
* Creates a new instance.
*/
HAProxyProxiedProtocol(
byte byteValue,
AddressFamily addressFamily,
TransportProtocol transportProtocol) {
this.byteValue = byteValue;
this.addressFamily = addressFamily;
this.transportProtocol = transportProtocol;
}
/**
* Returns the {@link HAProxyProxiedProtocol} represented by the specified byte.
*
* @param tpafByte transport protocol and address family byte
*/
public static HAProxyProxiedProtocol valueOf(byte tpafByte) {
switch (tpafByte) {
case TPAF_TCP4_BYTE:
return TCP4;
case TPAF_TCP6_BYTE:
return TCP6;
case TPAF_UNKNOWN_BYTE:
return UNKNOWN;
case TPAF_UDP4_BYTE:
return UDP4;
case TPAF_UDP6_BYTE:
return UDP6;
case TPAF_UNIX_STREAM_BYTE:
return UNIX_STREAM;
case TPAF_UNIX_DGRAM_BYTE:
return UNIX_DGRAM;
default:
throw new IllegalArgumentException(
"unknown transport protocol + address family: " + (tpafByte & 0xFF));
}
}
/**
* Returns the byte value of this protocol and address family.
*/
public byte byteValue() {
return byteValue;
}
Source
Frequently Asked Questions
What is the HAProxyProxiedProtocol type?
HAProxyProxiedProtocol is a type/interface in the netty codebase, defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyProxiedProtocol.java.
Where is HAProxyProxiedProtocol defined?
HAProxyProxiedProtocol is defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyProxiedProtocol.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free