Enum HttpVersion
- All Implemented Interfaces:
Serializable, Comparable<HttpVersion>
Represents the version of the HTTP protocol.
- Author:
- Tim Fox
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionalpnName()static HttpVersionfromAlpnName(String id) Provides the version of the given protocolidstatic HttpVersionfromProtocol(HttpProtocol protocol) Provides the version of the given protocolidstatic HttpVersionReturns the enum constant of this type with the specified name.static HttpVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HTTP_1_0
-
HTTP_1_1
-
HTTP_2
-
HTTP_3
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
alpnName
- Returns:
- the protocol name for Application-Layer Protocol Negotiation (ALPN) of the secured version of this protocol version.
-
protocols
- Returns:
- the associated Application-Layer Protocol Negotiation (ALPN) protocols.
-
fromAlpnName
Provides the version of the given protocolid- Parameters:
id- the protocol id- Returns:
- the version of
nullwhen no id is matching
-
fromProtocol
Provides the version of the given protocolid- Parameters:
id- the protocol id- Returns:
- the version of
nullwhen no id is matching
-