org.apache.awf.web.http.protocol
Enum HttpVerb

java.lang.Object
  extended by java.lang.Enum<HttpVerb>
      extended by org.apache.awf.web.http.protocol.HttpVerb
All Implemented Interfaces:
Serializable, Comparable<HttpVerb>

public enum HttpVerb
extends Enum<HttpVerb>

An Enumeration of all available HTTP verbs, as defined by Hypertext Transfer Protocol -- HTTP/1.1 (RFC 2616).


Enum Constant Summary
CONNECT
          "This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a tunnel " (RFC 2616, 9.9)
DELETE
          "The DELETE method requests that the origin server delete the resource identified by the Request-URI.
GET
          "The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HEAD
          "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
OPTIONS
          "The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
POST
          "The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
PUT
          "The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
TRACE
          "The TRACE method is used to invoke a remote, application-layer loop- back of the request message.
 
Method Summary
static HttpVerb valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HttpVerb[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OPTIONS

public static final HttpVerb OPTIONS
"The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI." (RFC 2616, 9.2)


GET

public static final HttpVerb GET
"The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI." (RFC 2616, 9.3)


HEAD

public static final HttpVerb HEAD
"The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." (RFC 2616, 9.4)


POST

public static final HttpVerb POST
"The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line." (RFC 2616, 9.5)


PUT

public static final HttpVerb PUT
"The PUT method requests that the enclosed entity be stored under the supplied Request-URI." (RFC 2616, 9.6)


DELETE

public static final HttpVerb DELETE
"The DELETE method requests that the origin server delete the resource identified by the Request-URI." (RFC 2616, 9.7)


TRACE

public static final HttpVerb TRACE
"The TRACE method is used to invoke a remote, application-layer loop- back of the request message." (RFC 2616, 9.8)


CONNECT

public static final HttpVerb CONNECT
"This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a tunnel " (RFC 2616, 9.9)

Method Detail

values

public static HttpVerb[] 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 (HttpVerb c : HttpVerb.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HttpVerb 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


Copyright © 2012. All Rights Reserved.