public static class ProxyProtocolClientConnectionFactory.V1.Tag extends java.lang.Object implements ClientConnectionFactory.Decorator
PROXY protocol version 1 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 1 bytes specified by this metadata.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
dstIP |
private int |
dstPort |
private java.lang.String |
family |
private java.lang.String |
srcIP |
private int |
srcPort |
static ProxyProtocolClientConnectionFactory.V1.Tag |
UNKNOWN
The PROXY V1 Tag typically used to "ping" the server.
|
Constructor and Description |
---|
Tag()
Creates a Tag whose metadata will be derived from the underlying EndPoint.
|
Tag(java.lang.String srcIP,
int srcPort)
Creates a Tag with the given source metadata.
|
Tag(java.lang.String family,
java.lang.String srcIP,
int srcPort,
java.lang.String dstIP,
int dstPort)
Creates a Tag with the given metadata.
|
Modifier and Type | Method and Description |
---|---|
ClientConnectionFactory |
apply(ClientConnectionFactory factory)
Wraps the given
factory . |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDestinationAddress() |
int |
getDestinationPort() |
java.lang.String |
getFamily() |
java.lang.String |
getSourceAddress() |
int |
getSourcePort() |
int |
hashCode() |
public static final ProxyProtocolClientConnectionFactory.V1.Tag UNKNOWN
private final java.lang.String family
private final java.lang.String srcIP
private final int srcPort
private final java.lang.String dstIP
private final int dstPort
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 family, java.lang.String srcIP, int srcPort, java.lang.String dstIP, int dstPort)
Creates a Tag with the given metadata.
family
- the protocol familysrcIP
- the source IP addresssrcPort
- the source portdstIP
- the destination IP addressdstPort
- the destination portpublic java.lang.String getFamily()
public java.lang.String getSourceAddress()
public int getSourcePort()
public java.lang.String getDestinationAddress()
public int getDestinationPort()
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