Class ProxyProtocolClientConnectionFactory.V2.Tag

java.lang.Object
org.eclipse.jetty.client.ProxyProtocolClientConnectionFactory.V2.Tag
All Implemented Interfaces:
org.eclipse.jetty.io.ClientConnectionFactory.Decorator
Enclosing class:
ProxyProtocolClientConnectionFactory.V2

public static class ProxyProtocolClientConnectionFactory.V2.Tag extends Object implements org.eclipse.jetty.io.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.

  • Field Details

  • Constructor Details

  • Method Details

    • from

      public static ProxyProtocolClientConnectionFactory.V2.Tag from(org.eclipse.jetty.io.EndPoint endPoint, boolean local)

      Creates a Tag from the given EndPoint.

      The source parameter indicates whether the EndPoint is the local EndPoint (typical for clients), or the remote EndPoint (typical for proxies). In the latter case, the proxy wants to forward to the server the information about the remote client so the EndPoint must be that connected to the remote client (not to the server).

      Parameters:
      endPoint - the EndPoint to create the Tag from
      local - whether the EndPoint is local or remote
      Returns:
      a new Tag from the given EndPoint
    • getCommand

    • getFamily

    • getProtocol

    • getSourceAddress

      public String getSourceAddress()
    • getSourcePort

      public int getSourcePort()
    • getDestinationAddress

      public String getDestinationAddress()
    • getDestinationPort

      public int getDestinationPort()
    • getTLVs

    • apply

      public org.eclipse.jetty.io.ClientConnectionFactory apply(org.eclipse.jetty.io.ClientConnectionFactory factory)
      Specified by:
      apply in interface org.eclipse.jetty.io.ClientConnectionFactory.Decorator
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object