Package net.officefloor.server.http
Enum HttpVersion.HttpVersionEnum
- java.lang.Object
-
- java.lang.Enum<HttpVersion.HttpVersionEnum>
-
- net.officefloor.server.http.HttpVersion.HttpVersionEnum
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<HttpVersion.HttpVersionEnum>
- Enclosing class:
- HttpVersion
public static enum HttpVersion.HttpVersionEnum extends java.lang.Enum<HttpVersion.HttpVersionEnum>
HttpVersionEnumfor common HTTP methods.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HTTP_1_0CommonHttpVersioninstances.HTTP_1_1OTHERNon commonHttpVersion.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpVersiongetHttpVersion()Obtains the singletonHttpVersionfor thisHttpVersion.HttpVersionEnum.static HttpVersion.HttpVersionEnumvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HttpVersion.HttpVersionEnum[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HTTP_1_0
public static final HttpVersion.HttpVersionEnum HTTP_1_0
CommonHttpVersioninstances.
-
HTTP_1_1
public static final HttpVersion.HttpVersionEnum HTTP_1_1
-
OTHER
public static final HttpVersion.HttpVersionEnum OTHER
Non commonHttpVersion.
-
-
Method Detail
-
values
public static HttpVersion.HttpVersionEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HttpVersion.HttpVersionEnum c : HttpVersion.HttpVersionEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpVersion.HttpVersionEnum valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getHttpVersion
public HttpVersion getHttpVersion()
Obtains the singleton
HttpVersionfor thisHttpVersion.HttpVersionEnum.Note for
OTHERthis returnsnull.- Returns:
HttpVersion.
-
-