|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.handler.codec.http.HttpVersion
public class HttpVersion

The version of HTTP or its derived protocols, such as RTSP and ICAP.
| Field Summary | |
|---|---|
static HttpVersion |
HTTP_1_0
HTTP/1.0 |
static HttpVersion |
HTTP_1_1
HTTP/1.1 |
| Constructor Summary | |
|---|---|
HttpVersion(String text)
Deprecated. Use HttpVersion(String, boolean) instead. |
|
HttpVersion(String text,
boolean keepAliveDefault)
Creates a new HTTP version with the specified version string. |
|
HttpVersion(String protocolName,
int majorVersion,
int minorVersion)
Deprecated. Use HttpVersion(String, int, int, boolean) instead. |
|
HttpVersion(String protocolName,
int majorVersion,
int minorVersion,
boolean keepAliveDefault)
Creates a new HTTP version with the specified protocol name and version numbers. |
|
| Method Summary | |
|---|---|
int |
compareTo(HttpVersion o)
|
boolean |
equals(Object o)
|
int |
getMajorVersion()
Returns the name of the protocol such as 1 in "HTTP/1.0". |
int |
getMinorVersion()
Returns the name of the protocol such as 0 in "HTTP/1.0". |
String |
getProtocolName()
Returns the name of the protocol such as "HTTP" in "HTTP/1.0". |
String |
getText()
Returns the full protocol version text such as "HTTP/1.0". |
int |
hashCode()
|
boolean |
isKeepAliveDefault()
Returns true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly. |
String |
toString()
Returns the full protocol version text such as "HTTP/1.0". |
static HttpVersion |
valueOf(String text)
Returns an existing or new HttpVersion instance which matches to
the specified protocol version string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final HttpVersion HTTP_1_0
public static final HttpVersion HTTP_1_1
| Constructor Detail |
|---|
@Deprecated public HttpVersion(String text)
HttpVersion(String, boolean) instead.
public HttpVersion(String text,
boolean keepAliveDefault)
keepAliveDefault - true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
@Deprecated
public HttpVersion(String protocolName,
int majorVersion,
int minorVersion)
HttpVersion(String, int, int, boolean) instead.
public HttpVersion(String protocolName,
int majorVersion,
int minorVersion,
boolean keepAliveDefault)
keepAliveDefault - true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.| Method Detail |
|---|
public static HttpVersion valueOf(String text)
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.
public String getProtocolName()
"HTTP" in "HTTP/1.0".
public int getMajorVersion()
1 in "HTTP/1.0".
public int getMinorVersion()
0 in "HTTP/1.0".
public String getText()
"HTTP/1.0".
public boolean isKeepAliveDefault()
true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.
public String toString()
"HTTP/1.0".
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int compareTo(HttpVersion o)
compareTo in interface Comparable<HttpVersion>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||