- java.lang.Object
-
- org.eclipse.jetty.client.Origin.Protocol
-
- Enclosing class:
- Origin
public static class Origin.Protocol extends java.lang.ObjectThe 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
ClientConnectionFactorychain, 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.StringasString()booleanequals(java.lang.Object obj)java.util.List<java.lang.String>getProtocols()inthashCode()booleanisNegotiate()java.lang.StringtoString()
-
-
-
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:
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
-
-