Package io.netty.handler.codec.haproxy
Class HAProxyMessage
- java.lang.Object
-
- io.netty.util.AbstractReferenceCounted
-
- io.netty.handler.codec.haproxy.HAProxyMessage
-
- All Implemented Interfaces:
io.netty.util.ReferenceCounted
public final class HAProxyMessage extends io.netty.util.AbstractReferenceCountedMessage container for decoded HAProxy proxy protocol parameters
-
-
Constructor Summary
Constructors Constructor Description HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort)Creates a new instance of HAProxyMessage.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HAProxyCommandcommand()Returns theHAProxyCommandof thisHAProxyMessage.protected voiddeallocate()StringdestinationAddress()Returns the human-readable destination address of thisHAProxyMessage.intdestinationPort()Returns the UDP/TCP destination port of thisHAProxyMessage.HAProxyProtocolVersionprotocolVersion()Returns theHAProxyProtocolVersionof thisHAProxyMessage.HAProxyProxiedProtocolproxiedProtocol()Returns theHAProxyProxiedProtocolof thisHAProxyMessage.booleanrelease()booleanrelease(int decrement)HAProxyMessageretain()HAProxyMessageretain(int increment)StringsourceAddress()Returns the human-readable source address of thisHAProxyMessageornullif HAProxy performs health check withsend-proxy-v2.intsourcePort()Returns the UDP/TCP source port of thisHAProxyMessage.List<HAProxyTLV>tlvs()Returns a list ofHAProxyTLVor an empty list if no TLVs are present.StringtoString()HAProxyMessagetouch()HAProxyMessagetouch(Object hint)
-
-
-
Constructor Detail
-
HAProxyMessage
public HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort)
Creates a new instance of HAProxyMessage.- Parameters:
protocolVersion- the protocol version.command- the command.proxiedProtocol- the protocol containing the address family and transport protocol.sourceAddress- the source address.destinationAddress- the destination address.sourcePort- the source port. This value must be 0 for unix, unspec addresses.destinationPort- the destination port. This value must be 0 for unix, unspec addresses.
-
HAProxyMessage
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.- Parameters:
protocolVersion- the protocol version.command- the command.proxiedProtocol- the protocol containing the address family and transport protocol.sourceAddress- the source address.destinationAddress- the destination address.sourcePort- the source port. This value must be 0 for unix, unspec addresses.destinationPort- the destination port. This value must be 0 for unix, unspec addresses.tlvs- the list of tlvs.
-
-
Method Detail
-
protocolVersion
public HAProxyProtocolVersion protocolVersion()
Returns theHAProxyProtocolVersionof thisHAProxyMessage.
-
command
public HAProxyCommand command()
Returns theHAProxyCommandof thisHAProxyMessage.
-
proxiedProtocol
public HAProxyProxiedProtocol proxiedProtocol()
Returns theHAProxyProxiedProtocolof thisHAProxyMessage.
-
sourceAddress
public String sourceAddress()
Returns the human-readable source address of thisHAProxyMessageornullif HAProxy performs health check withsend-proxy-v2.
-
destinationAddress
public String destinationAddress()
Returns the human-readable destination address of thisHAProxyMessage.
-
sourcePort
public int sourcePort()
Returns the UDP/TCP source port of thisHAProxyMessage.
-
destinationPort
public int destinationPort()
Returns the UDP/TCP destination port of thisHAProxyMessage.
-
tlvs
public List<HAProxyTLV> tlvs()
Returns a list ofHAProxyTLVor an empty list if no TLVs are present.TLVs are only available for the Proxy Protocol V2
-
touch
public HAProxyMessage touch()
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classio.netty.util.AbstractReferenceCounted
-
touch
public HAProxyMessage touch(Object hint)
-
retain
public HAProxyMessage retain()
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classio.netty.util.AbstractReferenceCounted
-
retain
public HAProxyMessage retain(int increment)
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classio.netty.util.AbstractReferenceCounted
-
release
public boolean release()
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted- Overrides:
releasein classio.netty.util.AbstractReferenceCounted
-
release
public boolean release(int decrement)
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted- Overrides:
releasein classio.netty.util.AbstractReferenceCounted
-
deallocate
protected void deallocate()
- Specified by:
deallocatein classio.netty.util.AbstractReferenceCounted
-
-