public enum HAProxyProtocolVersion extends java.lang.Enum<HAProxyProtocolVersion>
枚举常量和说明 |
---|
V1
The ONE proxy protocol version represents a version 1 (human-readable) header.
|
V2
The TWO proxy protocol version represents a version 2 (binary) header.
|
限定符和类型 | 方法和说明 |
---|---|
byte |
byteValue()
Returns the byte value of this version.
|
static HAProxyProtocolVersion |
valueOf(byte verCmdByte)
Returns the
HAProxyProtocolVersion represented by the highest 4 bits of the specified byte. |
static HAProxyProtocolVersion |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static HAProxyProtocolVersion[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HAProxyProtocolVersion V1
public static final HAProxyProtocolVersion V2
public static HAProxyProtocolVersion[] values()
for (HAProxyProtocolVersion c : HAProxyProtocolVersion.values()) System.out.println(c);
public static HAProxyProtocolVersion valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量,
则抛出 IllegalArgumentExceptionjava.lang.NullPointerException
- 如果参数为空值, 则抛出 NullPointerExceptionpublic static HAProxyProtocolVersion valueOf(byte verCmdByte)
HAProxyProtocolVersion
represented by the highest 4 bits of the specified byte.verCmdByte
- protocol version and command bytepublic byte byteValue()