Package org.eclipse.lyo.core.trs
Enum HttpConstants.HttpMethod
- java.lang.Object
-
- java.lang.Enum<HttpConstants.HttpMethod>
-
- org.eclipse.lyo.core.trs.HttpConstants.HttpMethod
-
- All Implemented Interfaces:
Serializable
,Comparable<HttpConstants.HttpMethod>
- Enclosing class:
- HttpConstants
public static enum HttpConstants.HttpMethod extends Enum<HttpConstants.HttpMethod>
HTTP method names, as documented by RFC2616, Section 9
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpConstants.HttpMethod
fromString(String name)
Constructs a HttpMethod from the referenced name, assumed to be the result of callingtoString()
on an HttpMethod instance.String
toString()
static HttpConstants.HttpMethod
valueOf(String name)
Returns the enum constant of this type with the specified name.static HttpConstants.HttpMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPTIONS
public static final HttpConstants.HttpMethod OPTIONS
-
GET
public static final HttpConstants.HttpMethod GET
-
HEAD
public static final HttpConstants.HttpMethod HEAD
-
POST
public static final HttpConstants.HttpMethod POST
-
PUT
public static final HttpConstants.HttpMethod PUT
-
DELETE
public static final HttpConstants.HttpMethod DELETE
-
TRACE
public static final HttpConstants.HttpMethod TRACE
-
CONNECT
public static final HttpConstants.HttpMethod CONNECT
-
-
Method Detail
-
values
public static HttpConstants.HttpMethod[] 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 (HttpConstants.HttpMethod c : HttpConstants.HttpMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpConstants.HttpMethod valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<HttpConstants.HttpMethod>
-
fromString
public static HttpConstants.HttpMethod fromString(String name)
Constructs a HttpMethod from the referenced name, assumed to be the result of callingtoString()
on an HttpMethod instance. This differs fromvalueOf(String)
in that method expects the declarative name (i.e the result ofEnum.name()
).- Parameters:
name
- The name of the HttpMethod to search for. May benull
. Ifnull
,null
is returned.- Returns:
- The MediaType whose
toString()
value equals that ofname
, elsenull
.
-
-