Class Origin.Protocol

java.lang.Object
org.eclipse.jetty.client.Origin.Protocol
Enclosing class:
Origin

public static class Origin.Protocol extends 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 in HttpClientTransportDynamic.newConnection(EndPoint, Map).

  • Constructor Details

    • Protocol

      public Protocol(List<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 names
      negotiate - whether the protocol should be negotiated
  • Method Details

    • getProtocols

      public List<String> getProtocols()
    • isNegotiate

      public boolean isNegotiate()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • asString

      public String asString()
    • toString

      public String toString()
      Overrides:
      toString in class Object