public static class ProxyProtocolClientConnectionFactory.V2.Tag extends java.lang.Object implements ClientConnectionFactory.Decorator
PROXY protocol version 2 metadata holder to be used in conjunction
with Request.tag(Object)
.
Instances of this class are associated to a destination so that all connections of that destination will initiate the communication with the PROXY protocol version 2 bytes specified by this metadata.
Modifier and Type | Class and Description |
---|---|
static class |
ProxyProtocolClientConnectionFactory.V2.Tag.Command |
static class |
ProxyProtocolClientConnectionFactory.V2.Tag.Family |
static class |
ProxyProtocolClientConnectionFactory.V2.Tag.Protocol |
static class |
ProxyProtocolClientConnectionFactory.V2.Tag.TLV |
Modifier and Type | Field and Description |
---|---|
static ProxyProtocolClientConnectionFactory.V2.Tag |
LOCAL
The PROXY V2 Tag typically used to "ping" the server.
|
Constructor and Description |
---|
Tag()
Creates a Tag whose metadata will be derived from the underlying EndPoint.
|
Tag(ProxyProtocolClientConnectionFactory.V2.Tag.Command command,
ProxyProtocolClientConnectionFactory.V2.Tag.Family family,
ProxyProtocolClientConnectionFactory.V2.Tag.Protocol protocol,
java.lang.String srcIP,
int srcPort,
java.lang.String dstIP,
int dstPort,
java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> tlvs)
Creates a Tag with the given metadata.
|
Tag(java.lang.String srcIP,
int srcPort)
Creates a Tag with the given source metadata.
|
Tag(java.lang.String srcIP,
int srcPort,
java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> tlvs)
Creates a Tag with the given source metadata and Type-Length-Value (TLV) objects.
|
Modifier and Type | Method and Description |
---|---|
ClientConnectionFactory |
apply(ClientConnectionFactory factory)
Wraps the given
factory . |
boolean |
equals(java.lang.Object obj) |
ProxyProtocolClientConnectionFactory.V2.Tag.Command |
getCommand() |
java.lang.String |
getDestinationAddress() |
int |
getDestinationPort() |
ProxyProtocolClientConnectionFactory.V2.Tag.Family |
getFamily() |
ProxyProtocolClientConnectionFactory.V2.Tag.Protocol |
getProtocol() |
java.lang.String |
getSourceAddress() |
int |
getSourcePort() |
java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> |
getTLVs() |
int |
hashCode() |
public static final ProxyProtocolClientConnectionFactory.V2.Tag LOCAL
public Tag()
Creates a Tag whose metadata will be derived from the underlying EndPoint.
public Tag(java.lang.String srcIP, int srcPort)
Creates a Tag with the given source metadata.
The destination metadata will be derived from the underlying EndPoint.
srcIP
- the source IP addresssrcPort
- the source portpublic Tag(java.lang.String srcIP, int srcPort, java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> tlvs)
Creates a Tag with the given source metadata and Type-Length-Value (TLV) objects.
The destination metadata will be derived from the underlying EndPoint.
srcIP
- the source IP addresssrcPort
- the source porttlvs
- the TLV objectspublic Tag(ProxyProtocolClientConnectionFactory.V2.Tag.Command command, ProxyProtocolClientConnectionFactory.V2.Tag.Family family, ProxyProtocolClientConnectionFactory.V2.Tag.Protocol protocol, java.lang.String srcIP, int srcPort, java.lang.String dstIP, int dstPort, java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> tlvs)
Creates a Tag with the given metadata.
command
- the LOCAL or PROXY commandfamily
- the protocol familyprotocol
- the protocol typesrcIP
- the source IP addresssrcPort
- the source portdstIP
- the destination IP addressdstPort
- the destination porttlvs
- the TLV objectspublic ProxyProtocolClientConnectionFactory.V2.Tag.Command getCommand()
public ProxyProtocolClientConnectionFactory.V2.Tag.Family getFamily()
public ProxyProtocolClientConnectionFactory.V2.Tag.Protocol getProtocol()
public java.lang.String getSourceAddress()
public int getSourcePort()
public java.lang.String getDestinationAddress()
public int getDestinationPort()
public java.util.List<ProxyProtocolClientConnectionFactory.V2.Tag.TLV> getTLVs()
public ClientConnectionFactory apply(ClientConnectionFactory factory)
ClientConnectionFactory.Decorator
Wraps the given factory
.
apply
in interface ClientConnectionFactory.Decorator
factory
- the ClientConnectionFactory to wrappublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 1995–2021 Webtide. All rights reserved.