Enum HttpProtocol
- All Implemented Interfaces:
Serializable
,Comparable<HttpProtocol>
,java.lang.constant.Constable
- Author:
- Stephane Maldini
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpProtocol
Returns the enum constant of this type with the specified name.static HttpProtocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HTTP11
The default supported HTTP protocol by HttpServer and HttpClient. -
H2
HTTP/2.0 support with TLSIf used along with HTTP/1.1 protocol, HTTP/2.0 will be the preferred protocol. While negotiating the application level protocol, HTTP/2.0 or HTTP/1.1 can be chosen.
If used without HTTP/1.1 protocol, HTTP/2.0 will always be offered as a protocol for communication with no fallback to HTTP/1.1.
-
H2C
HTTP/2.0 support with clear-text.If used along with HTTP/1.1 protocol, will support H2C "upgrade": Request or consume requests as HTTP/1.1 first, looking for HTTP/2.0 headers and Connection: Upgrade. A server will typically reply a successful 101 status if upgrade is successful or a fallback HTTP/1.1 response. When successful the client will start sending HTTP/2.0 traffic.
If used without HTTP/1.1 protocol, will support H2C "prior-knowledge": Doesn't require Connection: Upgrade handshake between a client and server but fallback to HTTP/1.1 will not be supported.
-
HTTP3
HTTP/3.0 support.- Since:
- 1.2.0
-
-
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
-