Package org.eclipse.lyo.core.trs
Enum Class HttpConstants.HttpMethod
- All Implemented Interfaces:
Serializable
,Comparable<HttpConstants.HttpMethod>
,Constable
- Enclosing class:
- HttpConstants
HTTP method names, as documented by RFC2616, Section 9
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpConstants.HttpMethod
fromString
(String name) Constructs a HttpMethod from the referenced name, assumed to be the result of callingtoString()
on an HttpMethod instance.toString()
static HttpConstants.HttpMethod
Returns the enum constant of this class with the specified name.static HttpConstants.HttpMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPTIONS
-
GET
-
HEAD
-
POST
-
PUT
-
DELETE
-
TRACE
-
CONNECT
-
-
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
-
toString
- Overrides:
toString
in classEnum<HttpConstants.HttpMethod>
-
fromString
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
.
-