Class HttpDestination.Protocol

  • Enclosing class:
    HttpDestination

    public static class HttpDestination.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 in HttpClientTransportDynamic.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.
    • 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 names
        negotiate - 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 class java.lang.Object
      • hashCode

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

        public java.lang.String asString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object