- java.lang.Object
-
- org.eclipse.jetty.client.HttpDestination.Key
-
- Enclosing class:
- HttpDestination
public static class HttpDestination.Key extends java.lang.ObjectClass that groups the elements that uniquely identify a destination.
The elements are an
Origin, aHttpDestination.Protocoland an opaque string that further distinguishes destinations that have the same origin and protocol.In general it is possible that, for the same origin, the server can speak different protocols (for example, clear-text HTTP/1.1 and clear-text HTTP/2), so the
HttpDestination.Protocolmakes that distinction.Furthermore, it may be desirable to have different destinations for the same origin and protocol (for example, when using the PROXY protocol in a reverse proxy server, you want to be able to map the client ip:port to the destination
kind, so that all the connections to the server associated to that destination can specify the PROXY protocol bytes for that particular client connection.
-
-
Constructor Summary
Constructors Constructor Description Key(Origin origin, HttpDestination.Protocol protocol)Creates a Key with the given origin and protocol and anullkind.Key(Origin origin, HttpDestination.Protocol protocol, java.lang.String kind)Creates a Key with the given origin and protocol and kind.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString()booleanequals(java.lang.Object obj)java.lang.StringgetKind()OrigingetOrigin()HttpDestination.ProtocolgetProtocol()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Key
public Key(Origin origin, HttpDestination.Protocol protocol)
Creates a Key with the given origin and protocol and anullkind.- Parameters:
origin- the originprotocol- the protocol
-
Key
public Key(Origin origin, HttpDestination.Protocol protocol, java.lang.String kind)
Creates a Key with the given origin and protocol and kind.- Parameters:
origin- the originprotocol- the protocolkind- the opaque kind
-
-
Method Detail
-
getOrigin
public Origin getOrigin()
-
getProtocol
public HttpDestination.Protocol getProtocol()
-
getKind
public java.lang.String getKind()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
asString
public java.lang.String asString()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-