Enum HttpVersion

java.lang.Object
java.lang.Enum<HttpVersion>
io.vertx.core.http.HttpVersion
All Implemented Interfaces:
Serializable, Comparable<HttpVersion>

public enum HttpVersion extends Enum<HttpVersion>
Represents the version of the HTTP protocol.
Author:
Tim Fox
  • Enum Constant Details

  • Method Details

    • values

      public static HttpVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static HttpVersion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • alpnName

      public String alpnName()
      Returns:
      the protocol name for Application-Layer Protocol Negotiation (ALPN) of the secured version of this protocol version.
    • protocols

      public List<HttpProtocol> protocols()
      Returns:
      the associated Application-Layer Protocol Negotiation (ALPN) protocols.
    • fromAlpnName

      public static HttpVersion fromAlpnName(String id)
      Provides the version of the given protocol id
      Parameters:
      id - the protocol id
      Returns:
      the version of null when no id is matching
    • fromProtocol

      public static HttpVersion fromProtocol(HttpProtocol protocol)
      Provides the version of the given protocol id
      Parameters:
      id - the protocol id
      Returns:
      the version of null when no id is matching