public enum HAProxyCommand extends java.lang.Enum<HAProxyCommand>
枚举常量和说明 |
---|
LOCAL
The LOCAL command represents a connection that was established on purpose by the proxy
without being relayed.
|
PROXY
The PROXY command represents a connection that was established on behalf of another node,
and reflects the original connection endpoints.
|
限定符和类型 | 方法和说明 |
---|---|
byte |
byteValue()
Returns the byte value of this command.
|
static HAProxyCommand |
valueOf(byte verCmdByte)
Returns the
HAProxyCommand represented by the lowest 4 bits of the specified byte. |
static HAProxyCommand |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static HAProxyCommand[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HAProxyCommand LOCAL
public static final HAProxyCommand PROXY
public static HAProxyCommand[] values()
for (HAProxyCommand c : HAProxyCommand.values()) System.out.println(c);
public static HAProxyCommand valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量,
则抛出 IllegalArgumentExceptionjava.lang.NullPointerException
- 如果参数为空值, 则抛出 NullPointerExceptionpublic static HAProxyCommand valueOf(byte verCmdByte)
HAProxyCommand
represented by the lowest 4 bits of the specified byte.verCmdByte
- protocol version and command bytepublic byte byteValue()