Top Description Fields Constructors Methods
io.netty.handler.codec.haproxy

public final Enum HAProxyProtocolVersion

extends Enum<HAProxyProtocolVersion>
Class Inheritance
Static Imports
io.netty.handler.codec.haproxy.HAProxyConstants.*

The HAProxy proxy protocol specification version.

Field Summary

Modifier and TypeField and Description
private final byte
public static final HAProxyProtocolVersion
V1

The ONE proxy protocol version represents a version 1 (human-readable) header.

public static final HAProxyProtocolVersion
V2

The TWO proxy protocol version represents a version 2 (binary) header.

private static final byte
VERSION_MASK

The highest 4 bits of the protocol version and command byte contain the version

Constructor Summary

AccessConstructor and Description
private
HAProxyProtocolVersion(byte byteValue)

Creates a new instance

Method Summary

Modifier and TypeMethod and Description
public byte
byteValue()

Returns the byte value of this version.

public static HAProxyProtocolVersion
public static HAProxyProtocolVersion
valueOf(byte
protocol version and command byte
verCmdByte
)

Returns the HAProxyProtocolVersion represented by the highest 4 bits of the specified byte.

public static HAProxyProtocolVersion[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

byteValueback to summary
private final byte byteValue
V1back to summary
public static final HAProxyProtocolVersion V1

The ONE proxy protocol version represents a version 1 (human-readable) header.

V2back to summary
public static final HAProxyProtocolVersion V2

The TWO proxy protocol version represents a version 2 (binary) header.

VERSION_MASKback to summary
private static final byte VERSION_MASK

The highest 4 bits of the protocol version and command byte contain the version

Constructor Detail

HAProxyProtocolVersionback to summary
private HAProxyProtocolVersion(byte byteValue)

Creates a new instance

Method Detail

byteValueback to summary
public byte byteValue()

Returns the byte value of this version.

valueOfback to summary
public static HAProxyProtocolVersion valueOf(String name)
valueOfback to summary
public static HAProxyProtocolVersion valueOf(byte verCmdByte)

Returns the HAProxyProtocolVersion represented by the highest 4 bits of the specified byte.

Parameters
verCmdByte:byte

protocol version and command byte

valuesback to summary
public static HAProxyProtocolVersion[] values()