public enum HAProxyCommand extends Enum<HAProxyCommand> implements ProxyProtocolConstants
| Enum Constant and Description |
|---|
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.
|
AF_IPV4_BYTE, AF_IPV6_BYTE, AF_UNIX_BYTE, AF_UNSPEC_BYTE, BINARY_PREFIX, BINARY_PREFIX_LENGTH, COMMAND_LOCAL_BYTE, COMMAND_PROXY_BYTE, TEXT_PREFIX, TPAF_TCP4_BYTE, TPAF_TCP6_BYTE, TPAF_UDP4_BYTE, TPAF_UDP6_BYTE, TPAF_UNIX_DGRAM_BYTE, TPAF_UNIX_STREAM_BYTE, TPAF_UNKNOWN_BYTE, TRANSPORT_DGRAM_BYTE, TRANSPORT_STREAM_BYTE, TRANSPORT_UNSPEC_BYTE, V1_MAX_LENGTH, V2_MAX_LENGTH, V2_MAX_TLV, V2_MIN_LENGTH, VERSION_ONE_BYTE, VERSION_TWO_BYTE| Modifier and Type | Method and Description |
|---|---|
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(String name)
Returns the enum constant of this type with the specified name.
|
static HAProxyCommand[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
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(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static HAProxyCommand valueOf(byte verCmdByte)
HAProxyCommand represented by the lowest 4 bits of the specified byte.verCmdByte - protocol version and command bytepublic byte byteValue()
Copyright © 2018–2021. All rights reserved.