Package org.eclipse.jetty.client
Class ProxyProtocolClientConnectionFactory.V1.Tag
- java.lang.Object
-
- org.eclipse.jetty.client.ProxyProtocolClientConnectionFactory.V1.Tag
-
- All Implemented Interfaces:
ClientConnectionFactory.Decorator
- Enclosing class:
- ProxyProtocolClientConnectionFactory.V1
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.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientConnectionFactory
apply(ClientConnectionFactory factory)
Wraps the givenfactory
.boolean
equals(java.lang.Object obj)
java.lang.String
getDestinationAddress()
int
getDestinationPort()
java.lang.String
getFamily()
java.lang.String
getSourceAddress()
int
getSourcePort()
int
hashCode()
-
-
-
Field Detail
-
UNKNOWN
public static final ProxyProtocolClientConnectionFactory.V1.Tag UNKNOWN
The PROXY V1 Tag typically used to "ping" the server.
-
family
private final java.lang.String family
-
srcIP
private final java.lang.String srcIP
-
srcPort
private final int srcPort
-
dstIP
private final java.lang.String dstIP
-
dstPort
private final int dstPort
-
-
Constructor Detail
-
Tag
public Tag()
Creates a Tag whose metadata will be derived from the underlying EndPoint.
-
Tag
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.
- Parameters:
srcIP
- the source IP addresssrcPort
- the source port
-
Tag
public Tag(java.lang.String family, java.lang.String srcIP, int srcPort, java.lang.String dstIP, int dstPort)
Creates a Tag with the given metadata.
- Parameters:
family
- the protocol familysrcIP
- the source IP addresssrcPort
- the source portdstIP
- the destination IP addressdstPort
- the destination port
-
-
Method Detail
-
getFamily
public java.lang.String getFamily()
-
getSourceAddress
public java.lang.String getSourceAddress()
-
getSourcePort
public int getSourcePort()
-
getDestinationAddress
public java.lang.String getDestinationAddress()
-
getDestinationPort
public int getDestinationPort()
-
apply
public ClientConnectionFactory apply(ClientConnectionFactory factory)
Description copied from interface:ClientConnectionFactory.Decorator
Wraps the given
factory
.- Specified by:
apply
in interfaceClientConnectionFactory.Decorator
- Parameters:
factory
- the ClientConnectionFactory to wrap- Returns:
- the wrapping ClientConnectionFactory
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-