Package org.miaixz.bus.http
Enum Class Protocol
- All Implemented Interfaces:
Serializable,Comparable<Protocol>,Constable
协议vs计划 它的名字是:
URL.getProtocol()
返回scheme (http, https, etc.),
而不是协议(http/1.1, spdy/3.1,等等) 请使用这个协议来识别它是如何被分割的
Httpd使用协议这个词来标识HTTP消息是如何构造的- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription明文HTTP/2,没有"upgrade"往返。此选项要求客户端事先知道服务器支持明文HTTP/2一种过时的plaintext,默认情况下不使用持久套接字包含持久连接的plaintext 此版本的Httpd实现了RFC 7230,并跟踪对该规范的修订IETF的二进制框架协议,包括头压缩、在同一个套接字上多路复用多个请求和服务器推送 HTTP/1.1语义是在HTTP/2上分层的QUIC(快速UDP互联网连接)是一个新的多路复用和UDP之上的安全传输, 从底层设计和优化的HTTP/2语义。HTTP/1.1语义是在HTTP/2上分层的SOAP 1.1协议SOAP 1.2协议Chromium的二进制框架协议,包括标头压缩、在同一个套接字上多路复用多个请求和服务器推送 HTTP/1.1语义在SPDY/3上分层. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocoltoString()返回用于识别ALPN协议的字符串,如“http/1.1”、“spdy/3.1”或“http/2.0”.static ProtocolReturns the enum constant of this class with the specified name.static Protocol[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTTP_1_0
一种过时的plaintext,默认情况下不使用持久套接字 -
HTTP_1_1
包含持久连接的plaintext 此版本的Httpd实现了RFC 7230,并跟踪对该规范的修订 -
HTTP_2
IETF的二进制框架协议,包括头压缩、在同一个套接字上多路复用多个请求和服务器推送 HTTP/1.1语义是在HTTP/2上分层的 -
SPDY_3
Chromium的二进制框架协议,包括标头压缩、在同一个套接字上多路复用多个请求和服务器推送 HTTP/1.1语义在SPDY/3上分层. -
H2_PRIOR_KNOWLEDGE
明文HTTP/2,没有"upgrade"往返。此选项要求客户端事先知道服务器支持明文HTTP/2 -
QUIC
QUIC(快速UDP互联网连接)是一个新的多路复用和UDP之上的安全传输, 从底层设计和优化的HTTP/2语义。HTTP/1.1语义是在HTTP/2上分层的 -
SOAP_1_1
SOAP 1.1协议 -
SOAP_1_2
SOAP 1.2协议
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
get
- Parameters:
protocol- 协议标示- Returns:
- 返回由
protocol标识的协议 - Throws:
IOException- ifprotocolis unknown.
-
toString
返回用于识别ALPN协议的字符串,如“http/1.1”、“spdy/3.1”或“http/2.0”.
-