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
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
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 name
NullPointerException
- if the argument is null
toString
public String toString()
- Overrides:
toString
in class Enum<HttpConstants.HttpMethod>
fromString
public static HttpConstants.HttpMethod fromString(String name)
- Constructs a HttpMethod from the referenced name, assumed to be the
result of calling
toString()
on an HttpMethod instance. This
differs from valueOf(String)
in that method expects the
declarative name (i.e the result of Enum.name()
).
- Parameters:
name
- The name of the HttpMethod to search for. May be null
. If
null
, null
is returned.
- Returns:
- The MediaType whose
toString()
value equals that of name
,
else null
.
Copyright © 2013. All rights reserved.