Package org.eclipse.jetty.client
Class Origin.Protocol
- java.lang.Object
-
- org.eclipse.jetty.client.Origin.Protocol
-
- Enclosing class:
- Origin
public static class Origin.Protocol extends java.lang.Object
The representation of a network protocol.
A network protocol may have multiple protocol names associated to it, for example
["h2", "h2-17", "h2-16"]
.A Protocol is then rendered into a
ClientConnectionFactory
chain, for example inHttpClientTransportDynamic.newConnection(EndPoint, Map)
.
-
-
Constructor Summary
Constructors Constructor Description Protocol(java.util.List<java.lang.String> protocols, boolean negotiate)
Creates a Protocol with the given list of protocol names and whether it should negotiate the protocol.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
boolean
equals(java.lang.Object obj)
java.util.List<java.lang.String>
getProtocols()
int
hashCode()
boolean
isNegotiate()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Protocol
public Protocol(java.util.List<java.lang.String> protocols, boolean negotiate)
Creates a Protocol with the given list of protocol names and whether it should negotiate the protocol.- Parameters:
protocols
- the protocol namesnegotiate
- whether the protocol should be negotiated
-
-
Method Detail
-
getProtocols
public java.util.List<java.lang.String> getProtocols()
-
isNegotiate
public boolean isNegotiate()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
asString
public java.lang.String asString()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-