Package io.netty.handler.codec.haproxy
Enum HAProxyProxiedProtocol
- java.lang.Object
-
- java.lang.Enum<HAProxyProxiedProtocol>
-
- io.netty.handler.codec.haproxy.HAProxyProxiedProtocol
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HAProxyProxiedProtocol>
public enum HAProxyProxiedProtocol extends java.lang.Enum<HAProxyProxiedProtocol>
A protocol proxied by HAProxy which is represented by its transport protocol and address family.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HAProxyProxiedProtocol.AddressFamily
The address family of an HAProxy proxy protocol header.static class
HAProxyProxiedProtocol.TransportProtocol
The transport protocol of an HAProxy proxy protocol header
-
Enum Constant Summary
Enum Constants Enum Constant Description TCP4
The TCP4 represents a connection which was forwarded for an IPv4 client over TCP.TCP6
The TCP6 represents a connection which was forwarded for an IPv6 client over TCP.UDP4
The UDP4 represents a connection which was forwarded for an IPv4 client over UDP.UDP6
The UDP6 represents a connection which was forwarded for an IPv6 client over UDP.UNIX_DGRAM
The UNIX_DGRAM represents a connection which was forwarded for a UNIX datagram socket.UNIX_STREAM
The UNIX_STREAM represents a connection which was forwarded for a UNIX stream socket.UNKNOWN
The UNKNOWN represents a connection which was forwarded for an unknown protocol and an unknown address family.
-
Field Summary
Fields Modifier and Type Field Description private HAProxyProxiedProtocol.AddressFamily
addressFamily
private byte
byteValue
private HAProxyProxiedProtocol.TransportProtocol
transportProtocol
-
Constructor Summary
Constructors Modifier Constructor Description private
HAProxyProxiedProtocol(byte byteValue, HAProxyProxiedProtocol.AddressFamily addressFamily, HAProxyProxiedProtocol.TransportProtocol transportProtocol)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HAProxyProxiedProtocol.AddressFamily
addressFamily()
Returns theHAProxyProxiedProtocol.AddressFamily
of this protocol and address family.byte
byteValue()
Returns the byte value of this protocol and address family.HAProxyProxiedProtocol.TransportProtocol
transportProtocol()
Returns theHAProxyProxiedProtocol.TransportProtocol
of this protocol and address family.static HAProxyProxiedProtocol
valueOf(byte tpafByte)
Returns theHAProxyProxiedProtocol
represented by the specified byte.static HAProxyProxiedProtocol
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HAProxyProxiedProtocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final HAProxyProxiedProtocol UNKNOWN
The UNKNOWN represents a connection which was forwarded for an unknown protocol and an unknown address family.
-
TCP4
public static final HAProxyProxiedProtocol TCP4
The TCP4 represents a connection which was forwarded for an IPv4 client over TCP.
-
TCP6
public static final HAProxyProxiedProtocol TCP6
The TCP6 represents a connection which was forwarded for an IPv6 client over TCP.
-
UDP4
public static final HAProxyProxiedProtocol UDP4
The UDP4 represents a connection which was forwarded for an IPv4 client over UDP.
-
UDP6
public static final HAProxyProxiedProtocol UDP6
The UDP6 represents a connection which was forwarded for an IPv6 client over UDP.
-
UNIX_STREAM
public static final HAProxyProxiedProtocol UNIX_STREAM
The UNIX_STREAM represents a connection which was forwarded for a UNIX stream socket.
-
UNIX_DGRAM
public static final HAProxyProxiedProtocol UNIX_DGRAM
The UNIX_DGRAM represents a connection which was forwarded for a UNIX datagram socket.
-
-
Field Detail
-
byteValue
private final byte byteValue
-
addressFamily
private final HAProxyProxiedProtocol.AddressFamily addressFamily
-
transportProtocol
private final HAProxyProxiedProtocol.TransportProtocol transportProtocol
-
-
Constructor Detail
-
HAProxyProxiedProtocol
private HAProxyProxiedProtocol(byte byteValue, HAProxyProxiedProtocol.AddressFamily addressFamily, HAProxyProxiedProtocol.TransportProtocol transportProtocol)
Creates a new instance.
-
-
Method Detail
-
values
public static HAProxyProxiedProtocol[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HAProxyProxiedProtocol c : HAProxyProxiedProtocol.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HAProxyProxiedProtocol valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
valueOf
public static HAProxyProxiedProtocol valueOf(byte tpafByte)
Returns theHAProxyProxiedProtocol
represented by the specified byte.- Parameters:
tpafByte
- transport protocol and address family byte
-
byteValue
public byte byteValue()
Returns the byte value of this protocol and address family.
-
addressFamily
public HAProxyProxiedProtocol.AddressFamily addressFamily()
Returns theHAProxyProxiedProtocol.AddressFamily
of this protocol and address family.
-
transportProtocol
public HAProxyProxiedProtocol.TransportProtocol transportProtocol()
Returns theHAProxyProxiedProtocol.TransportProtocol
of this protocol and address family.
-
-