GeezerVison is showing netty.io — HttpVersion (Netty API Reference (4.1.141.Final))
Class HttpVersion
-
Field Summary
Fields
Modifier and Type
Field
Description
-
Constructor Summary
Constructors
Constructor
Description
Creates a new HTTP version with the specified version string.
HttpVersion(String protocolName,
int majorVersion,
int minorVersion,
boolean keepAliveDefault)
Creates a new HTTP version with the specified protocol name and version
numbers.
-
Method Summary
Modifier and Type
Method
Description
int
boolean
int
boolean
Returns true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
int
Returns the name of the protocol such as 1 in "HTTP/1.0".
int
Returns the name of the protocol such as 0 in "HTTP/1.0".
Returns the name of the protocol such as "HTTP" in "HTTP/1.0".
Returns the full protocol version text such as "HTTP/1.0".
Returns the full protocol version text such as "HTTP/1.0".
Returns an existing or new
HttpVersion instance which matches to
the specified protocol version string.
-
-
Constructor Details
-
HttpVersion
public HttpVersion(String text,
boolean keepAliveDefault)
Creates a new HTTP version with the specified version string. You will
not need to create a new instance unless you are implementing a protocol
derived from HTTP, such as
RTSP and
ICAP.
- Parameters:
keepAliveDefault - true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
-
HttpVersion
public HttpVersion(String protocolName,
int majorVersion,
int minorVersion,
boolean keepAliveDefault)
Creates a new HTTP version with the specified protocol name and version
numbers. You will not need to create a new instance unless you are
implementing a protocol derived from HTTP, such as
RTSP and
ICAP
- Parameters:
keepAliveDefault - true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
-
Method Details
-
valueOf
Returns an existing or new
HttpVersion instance which matches to
the specified protocol version string. If the specified
text is
equal to
"HTTP/1.0",
HTTP_1_0 will be returned. If the
specified
text is equal to
"HTTP/1.1",
HTTP_1_1
will be returned. Otherwise, a new
HttpVersion instance will be
returned.
-
protocolName
Returns the name of the protocol such as "HTTP" in "HTTP/1.0".
-
majorVersion
public int majorVersion()
Returns the name of the protocol such as 1 in "HTTP/1.0".
-
minorVersion
public int minorVersion()
Returns the name of the protocol such as 0 in "HTTP/1.0".
-
text
Returns the full protocol version text such as "HTTP/1.0".
-
isKeepAliveDefault
public boolean isKeepAliveDefault()
Returns true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
-
toString
Returns the full protocol version text such as "HTTP/1.0".
- Overrides:
toString in class Object
-
-
-