| Modifier and Type | Field and Description |
|---|---|
| private final HAProxyCommand | |
| private final String | |
| private final int | |
| private final HAProxyProtocolVersion | |
| private final HAProxyProxiedProtocol | |
| private final String | |
| private final int | |
| private final List |
| Access | Constructor and Description |
|---|---|
| private | HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, String sourcePort, String destinationPort)
Creates a new instance |
| public | HAProxyMessage(HAProxyProtocolVersion
the protocol version. protocolVersion, HAProxyCommand the command. command, HAProxyProxiedProtocol the protocol containing the address family and transport protocol. proxiedProtocol, String the source address. sourceAddress, String the destination address. destinationAddress, int the source port. This value must be 0 for unix, unspec addresses. sourcePort, int the destination port. This value must be 0 for unix, unspec addresses. destinationPort)Creates a new instance of HAProxyMessage. |
| public | HAProxyMessage(HAProxyProtocolVersion
the protocol version. protocolVersion, HAProxyCommand the command. command, HAProxyProxiedProtocol the protocol containing the address family and transport protocol. proxiedProtocol, String the source address. sourceAddress, String the destination address. destinationAddress, int the source port. This value must be 0 for unix, unspec addresses. sourcePort, int the destination port. This value must be 0 for unix, unspec addresses. destinationPort, List<? extends HAProxyTLV> the list of tlvs. tlvs)Creates a new instance of HAProxyMessage. |
| Modifier and Type | Method and Description |
|---|---|
| private static void | checkAddress(String
human-readable address address, HAProxyProxiedProtocol.the addrFamilyAddressFamily to check the address againstValidate an address (IPv4, IPv6, Unix Socket) |
| private static void | checkPort(int
the UDP/TCP port port, HAProxyProxiedProtocol.Validate the port depending on the addrFamily. |
| public void | |
| public HAProxyCommand | |
| pack-priv static HAProxyMessage | Returns: HAProxyMessage instancea version 2 proxy protocol header header)Decodes a version 2, binary proxy protocol header. |
| pack-priv static HAProxyMessage | Returns: HAProxyMessage instancea version 1 proxy protocol header header)Decodes a version 1, human-readable proxy protocol header. |
| public String | |
| public int | |
| private static String | Returns: string representation of the ip addressbuffer containing ip address bytes header, int number of bytes to read (4 bytes for IPv4, 16 bytes for IPv6) addressLen)Convert ip address bytes to string representation |
| public boolean | |
| private static int | |
| public HAProxyProtocolVersion | |
| public HAProxyProxiedProtocol | |
| private static HAProxyTLV | |
| private static List | |
| public Send | send()
Implements io. |
| public String | sourceAddress()
Returns the human-readable source address of this |
| public int | |
| pack-priv int | |
| public List | |
| public String | |
| private static HAProxyMessage | unknownMsg(HAProxyProtocolVersion version, HAProxyCommand command)
Proxy protocol message for 'UNKNOWN' proxied protocols. |
| command | back to summary |
|---|---|
| private final HAProxyCommand command | |
| destinationAddress | back to summary |
|---|---|
| private final String destinationAddress | |
| destinationPort | back to summary |
|---|---|
| private final int destinationPort | |
| protocolVersion | back to summary |
|---|---|
| private final HAProxyProtocolVersion protocolVersion | |
| proxiedProtocol | back to summary |
|---|---|
| private final HAProxyProxiedProtocol proxiedProtocol | |
| sourceAddress | back to summary |
|---|---|
| private final String sourceAddress | |
| sourcePort | back to summary |
|---|---|
| private final int sourcePort | |
| tlvs | back to summary |
|---|---|
| private final List<HAProxyTLV> tlvs | |
| HAProxyMessage | back to summary |
|---|---|
| private HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, String sourcePort, String destinationPort) Creates a new instance | |
| HAProxyMessage | back to summary |
|---|---|
| public HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort) Creates a new instance of HAProxyMessage.
| |
| HAProxyMessage | back to summary |
|---|---|
| public HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort, List<? extends HAProxyTLV> tlvs) Creates a new instance of HAProxyMessage.
| |
| checkAddress | back to summary |
|---|---|
| private static void checkAddress(String address, HAProxyProxiedProtocol. Validate an address (IPv4, IPv6, Unix Socket)
| |
| checkPort | back to summary |
|---|---|
| private static void checkPort(int port, HAProxyProxiedProtocol. Validate the port depending on the addrFamily.
| |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. Close the resource, making it inaccessible. Note, this method is not thread-safe unless otherwise specified.
| |
| command | back to summary |
|---|---|
| public HAProxyCommand command() Returns the | |
| decodeHeader | back to summary |
|---|---|
| pack-priv static HAProxyMessage decodeHeader(Buffer header) Decodes a version 2, binary proxy protocol header.
| |
| decodeHeader | back to summary |
|---|---|
| pack-priv static HAProxyMessage decodeHeader(String header) Decodes a version 1, human-readable proxy protocol header.
| |
| destinationAddress | back to summary |
|---|---|
| public String destinationAddress() Returns the human-readable destination address of this | |
| destinationPort | back to summary |
|---|---|
| public int destinationPort() Returns the UDP/TCP destination port of this | |
| ipBytesToString | back to summary |
|---|---|
| private static String ipBytesToString(Buffer header, int addressLen) Convert ip address bytes to string representation | |
| isAccessible | back to summary |
|---|---|
| public boolean isAccessible() Implements io. Doc from io. Check if this object is accessible. | |
| portStringToInt | back to summary |
|---|---|
| private static int portStringToInt(String value) Convert port to integer
| |
| protocolVersion | back to summary |
|---|---|
| public HAProxyProtocolVersion protocolVersion() Returns the | |
| proxiedProtocol | back to summary |
|---|---|
| public HAProxyProxiedProtocol proxiedProtocol() Returns the | |
| readNextTLV | back to summary |
|---|---|
| private static HAProxyTLV readNextTLV(final Buffer header) | |
| readTlvs | back to summary |
|---|---|
| private static List | |
| send | back to summary |
|---|---|
| public Send Implements io. Doc from io. Send this object instance to another Thread, transferring the ownership to the recipient. The object must be in a state where it can be sent, which includes at least being accessible. When sent, this instance will immediately become inaccessible, as if by closing it. All attempts at accessing an object that has been sent, even if that object has not yet been received, should cause an exception to be thrown.
Calling
| |
| sourceAddress | back to summary |
|---|---|
| public String sourceAddress() Returns the human-readable source address of this | |
| sourcePort | back to summary |
|---|---|
| public int sourcePort() Returns the UDP/TCP source port of this | |
| tlvNumBytes | back to summary |
|---|---|
| pack-priv int tlvNumBytes() | |
| tlvs | back to summary |
|---|---|
| public List Returns a list of TLVs are only available for the Proxy Protocol V2 | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unknownMsg | back to summary |
|---|---|
| private static HAProxyMessage unknownMsg(HAProxyProtocolVersion version, HAProxyCommand command) Proxy protocol message for 'UNKNOWN' proxied protocols. Per spec, when the proxied protocol is 'UNKNOWN' we must discard all other header values. | |