Interface ProxyProtocolV2Data
- All Superinterfaces:
ProxyProtocolData
Binary (V2) Proxy protocol data parsed by
ProxyProtocolHandler. This is a specialization of
the ProxyProtocolData interface. The object returned from ServerRequest.proxyProtocolData() will
additionally implement this interface when the proxy version used is the V2 (binary) version.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe proxy command.static interfaceA Tag-Length-Value vector.Nested classes/interfaces inherited from interface ProxyProtocolData
ProxyProtocolData.Family, ProxyProtocolData.ProtocolModifier and TypeInterfaceDescriptionstatic enumProtocol family.static enumProtocol type. -
Method Summary
Modifier and TypeMethodDescriptioncommand()The command kind, indicating whether the connection was established on purpose by the proxy without being relayed (LOCAL) or on behalf of another relayed node (PROXY).The destination address, which may be either anInetSocketAddressor aUnixDomainSocketAddress.The source address, which may be either anInetSocketAddressor aUnixDomainSocketAddress.tlvs()The possibly-empty list of additional Tag-Length-Value vectors included in the proxy header.Methods inherited from interface ProxyProtocolData
destAddress, destPort, family, protocol, sourceAddress, sourcePortModifier and TypeMethodDescriptionDestination address that is either IP4 or IP46 depending onProxyProtocolData.family().intdestPort()Destination port number.family()Family from protocol header.protocol()Protocol from protocol header.Source address that is either IP4 or IP6 depending onProxyProtocolData.family().intSource port number.
-
Method Details
-
command
ProxyProtocolV2Data.Command command()The command kind, indicating whether the connection was established on purpose by the proxy without being relayed (LOCAL) or on behalf of another relayed node (PROXY).- Returns:
- The command.
-
sourceSocketAddress
SocketAddress sourceSocketAddress()The source address, which may be either anInetSocketAddressor aUnixDomainSocketAddress. If the address family isProxyProtocolData.Family.UNKNOWNor the transport protocol isProxyProtocolData.Protocol.UNKNOWN, then this will contain anInetSocketAddresswith the contents "0.0.0.0:0". Ifcommand()isProxyProtocolV2Data.Command.LOCAL, this returns the same unspecified address because address information from LOCAL headers is ignored.- Returns:
- The source socket address.
-
destSocketAddress
SocketAddress destSocketAddress()The destination address, which may be either anInetSocketAddressor aUnixDomainSocketAddress. If the address family isProxyProtocolData.Family.UNKNOWNor the transport protocol isProxyProtocolData.Protocol.UNKNOWN, then this will contain anInetSocketAddresswith the contents "0.0.0.0:0". Ifcommand()isProxyProtocolV2Data.Command.LOCAL, this returns the same unspecified address because address information from LOCAL headers is ignored.- Returns:
- The destination socket address.
-
tlvs
List<ProxyProtocolV2Data.Tlv> tlvs()The possibly-empty list of additional Tag-Length-Value vectors included in the proxy header. This is empty ifcommand()isProxyProtocolV2Data.Command.LOCAL, the address family isProxyProtocolData.Family.UNKNOWN, or the transport protocol isProxyProtocolData.Protocol.UNKNOWN, because the header data is ignored.- Returns:
- A never-null list of Tag-Length-Value data.
-