public final class HAProxyMessage extends AbstractReferenceCounted
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
HAProxyCommand |
command()
Returns the
HAProxyCommand of this HAProxyMessage . |
protected void |
deallocate()
Called once
AbstractReferenceCounted.refCnt() is equals 0. |
String |
destinationAddress()
Returns the human-readable destination address of this
HAProxyMessage . |
int |
destinationPort()
Returns the UDP/TCP destination port of this
HAProxyMessage . |
HAProxyProtocolVersion |
protocolVersion()
Returns the
HAProxyProtocolVersion of this HAProxyMessage . |
HAProxyProxiedProtocol |
proxiedProtocol()
Returns the
HAProxyProxiedProtocol of this HAProxyMessage . |
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0 . |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0 . |
HAProxyMessage |
retain()
Increases the reference count by
1 . |
HAProxyMessage |
retain(int increment)
Increases the reference count by the specified
increment . |
String |
sourceAddress()
Returns the human-readable source address of this
HAProxyMessage or null
if HAProxy performs health check with send-proxy-v2 . |
int |
sourcePort()
Returns the UDP/TCP source port of this
HAProxyMessage . |
List<HAProxyTLV> |
tlvs()
Returns a list of
HAProxyTLV or an empty list if no TLVs are present. |
String |
toString() |
HAProxyMessage |
touch()
Records the current access location of this object for debugging purposes.
|
HAProxyMessage |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
refCnt, setRefCnt
public HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort)
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.public HAProxyMessage(HAProxyProtocolVersion protocolVersion, HAProxyCommand command, HAProxyProxiedProtocol proxiedProtocol, String sourceAddress, String destinationAddress, int sourcePort, int destinationPort, List<? extends HAProxyTLV> tlvs)
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.public HAProxyProtocolVersion protocolVersion()
HAProxyProtocolVersion
of this HAProxyMessage
.public HAProxyCommand command()
HAProxyCommand
of this HAProxyMessage
.public HAProxyProxiedProtocol proxiedProtocol()
HAProxyProxiedProtocol
of this HAProxyMessage
.public String sourceAddress()
HAProxyMessage
or null
if HAProxy performs health check with send-proxy-v2
.public String destinationAddress()
HAProxyMessage
.public int sourcePort()
HAProxyMessage
.public int destinationPort()
HAProxyMessage
.public List<HAProxyTLV> tlvs()
HAProxyTLV
or an empty list if no TLVs are present.
TLVs are only available for the Proxy Protocol V2
public HAProxyMessage touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ReferenceCounted
touch
in class AbstractReferenceCounted
public HAProxyMessage touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.public HAProxyMessage retain()
ReferenceCounted
1
.retain
in interface ReferenceCounted
retain
in class AbstractReferenceCounted
public HAProxyMessage retain(int increment)
ReferenceCounted
increment
.retain
in interface ReferenceCounted
retain
in class AbstractReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
in interface ReferenceCounted
release
in class AbstractReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.release
in interface ReferenceCounted
release
in class AbstractReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedprotected void deallocate()
AbstractReferenceCounted
AbstractReferenceCounted.refCnt()
is equals 0.deallocate
in class AbstractReferenceCounted
Copyright © 2008–2024 The Netty Project. All rights reserved.