Top Description Fields Constructors Methods
io.vertx.core.http

public Class HttpMethod

extends Object
Class Inheritance
Annotations
@DataObject
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.core.json.JsonObject, java.util.Arrays, .Collections, .List, .Objects

Represents an HTTP method.
Authors
Tim Fox, Paulo Lopes

Field Summary

Modifier and TypeField and Description
public static final HttpMethod
ACL

The RFC 3744 ACL method, this instance is interned and uniquely used.

private static final List<HttpMethod>
ALL

All predefined methods.

public static final HttpMethod
BASELINE_CONTROL

The RFC 3253 BASELINE_CONTROL method, this instance is interned and uniquely used.

public static final HttpMethod
CHECKIN

The RFC 3253 CHECKIN method, this instance is interned and uniquely used.

public static final HttpMethod
CHECKOUT

The RFC 3253 CHECKOUT method, this instance is interned and uniquely used.

public static final HttpMethod
CONNECT

The RFC 2616 CONNECT method, this instance is interned and uniquely used.

public static final HttpMethod
COPY

The RFC 2518/4918 COPY method, this instance is interned and uniquely used.

public static final HttpMethod
DELETE

The RFC 2616 DELETE method, this instance is interned and uniquely used.

public static final HttpMethod
GET

The RFC 2616 GET method, this instance is interned and uniquely used.

public static final HttpMethod
HEAD

The RFC 2616 HEAD method, this instance is interned and uniquely used.

public static final HttpMethod
LABEL

The RFC 3253 LABEL method, this instance is interned and uniquely used.

public static final HttpMethod
LOCK

The RFC 2518/4918 LOCK method, this instance is interned and uniquely used.

public static final HttpMethod
MERGE

The RFC 3253 MERGE method, this instance is interned and uniquely used.

public static final HttpMethod
MKACTIVITY

The RFC 3253 MKACTIVITY method, this instance is interned and uniquely used.

public static final HttpMethod
MKCALENDAR

The RFC 4791 MKCALENDAR method, this instance is interned and uniquely used.

public static final HttpMethod
MKCOL

The RFC 2518/4918 MKCOL method, this instance is interned and uniquely used.

public static final HttpMethod
MKWORKSPACE

The RFC 3253 MKWORKSPACE method, this instance is interned and uniquely used.

public static final HttpMethod
MOVE

The RFC 2518/4918 MOVE method, this instance is interned and uniquely used.

private final HttpMethod
public static final HttpMethod
OPTIONS

The RFC 2616 OPTIONS method, this instance is interned and uniquely used.

public static final HttpMethod
ORDERPATCH

The RFC 3648 ORDERPATCH method, this instance is interned and uniquely used.

public static final HttpMethod
PATCH

The RFC 5789 PATCH method, this instance is interned and uniquely used.

public static final HttpMethod
POST

The {RFC 2616 @code POST} method, this instance is interned and uniquely used.

public static final HttpMethod
PROPFIND

The RFC 2518/4918 PROPFIND method, this instance is interned and uniquely used.

public static final HttpMethod
PROPPATCH

The RFC 2518/4918 PROPPATCH method, this instance is interned and uniquely used.

public static final HttpMethod
PUT

The RFC 2616 PUT method, this instance is interned and uniquely used.

public static final HttpMethod
REPORT

The RFC 3253 REPORT method, this instance is interned and uniquely used.

public static final HttpMethod
SEARCH

The RFC 5323 SEARCH method, this instance is interned and uniquely used.

public static final HttpMethod
TRACE

The RFC 2616 TRACE method, this instance is interned and uniquely used.

public static final HttpMethod
UNCHECKOUT

The RFC 3253 UNCHECKOUT method, this instance is interned and uniquely used.

public static final HttpMethod
UNLOCK

The RFC 2518/4918 UNLOCK method, this instance is interned and uniquely used.

public static final HttpMethod
UPDATE

The RFC 3253 UPDATE method, this instance is interned and uniquely used.

public static final HttpMethod
VERSION_CONTROL

The RFC 3253 VERSION_CONTROL method, this instance is interned and uniquely used.

Constructor Summary

AccessConstructor and Description
public
private
HttpMethod(HttpMethod nettyMethod)

Method Summary

Modifier and TypeMethod and Description
private static HttpMethod
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public static HttpMethod

Returns:

the HttpMethod instance for the specified netty method
fromNetty
(HttpMethod
the netty method
method
)

Lookup the HttpMethod value for the specified nettyMethod.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String

Returns:

the method name
name
()

public JsonObject
toJson()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

public HttpMethod

Returns:

the wrapped Netty method instance
toNetty
()

public String

Returns:

the same value than name()
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static HttpMethod

Returns:

the HttpMethod instance for the specified string value
valueOf
(String
the value
value
)

Lookup the HttpMethod value for the specified value.

public static List<HttpMethod>

Returns:

an un-modifiable list of known HTTP methods
values
()

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

ACLback to summary
public static final HttpMethod ACL

The RFC 3744 ACL method, this instance is interned and uniquely used.

ALLback to summary
private static final List<HttpMethod> ALL

All predefined methods.

BASELINE_CONTROLback to summary
public static final HttpMethod BASELINE_CONTROL

The RFC 3253 BASELINE_CONTROL method, this instance is interned and uniquely used.

CHECKINback to summary
public static final HttpMethod CHECKIN

The RFC 3253 CHECKIN method, this instance is interned and uniquely used.

CHECKOUTback to summary
public static final HttpMethod CHECKOUT

The RFC 3253 CHECKOUT method, this instance is interned and uniquely used.

CONNECTback to summary
public static final HttpMethod CONNECT

The RFC 2616 CONNECT method, this instance is interned and uniquely used.

COPYback to summary
public static final HttpMethod COPY

The RFC 2518/4918 COPY method, this instance is interned and uniquely used.

DELETEback to summary
public static final HttpMethod DELETE

The RFC 2616 DELETE method, this instance is interned and uniquely used.

GETback to summary
public static final HttpMethod GET

The RFC 2616 GET method, this instance is interned and uniquely used.

LABELback to summary
public static final HttpMethod LABEL

The RFC 3253 LABEL method, this instance is interned and uniquely used.

LOCKback to summary
public static final HttpMethod LOCK

The RFC 2518/4918 LOCK method, this instance is interned and uniquely used.

MERGEback to summary
public static final HttpMethod MERGE

The RFC 3253 MERGE method, this instance is interned and uniquely used.

MKACTIVITYback to summary
public static final HttpMethod MKACTIVITY

The RFC 3253 MKACTIVITY method, this instance is interned and uniquely used.

MKCALENDARback to summary
public static final HttpMethod MKCALENDAR

The RFC 4791 MKCALENDAR method, this instance is interned and uniquely used.

MKCOLback to summary
public static final HttpMethod MKCOL

The RFC 2518/4918 MKCOL method, this instance is interned and uniquely used.

MKWORKSPACEback to summary
public static final HttpMethod MKWORKSPACE

The RFC 3253 MKWORKSPACE method, this instance is interned and uniquely used.

MOVEback to summary
public static final HttpMethod MOVE

The RFC 2518/4918 MOVE method, this instance is interned and uniquely used.

nettyMethodback to summary
private final HttpMethod nettyMethod
OPTIONSback to summary
public static final HttpMethod OPTIONS

The RFC 2616 OPTIONS method, this instance is interned and uniquely used.

ORDERPATCHback to summary
public static final HttpMethod ORDERPATCH

The RFC 3648 ORDERPATCH method, this instance is interned and uniquely used.

PATCHback to summary
public static final HttpMethod PATCH

The RFC 5789 PATCH method, this instance is interned and uniquely used.

POSTback to summary
public static final HttpMethod POST

The {RFC 2616 @code POST} method, this instance is interned and uniquely used.

PROPFINDback to summary
public static final HttpMethod PROPFIND

The RFC 2518/4918 PROPFIND method, this instance is interned and uniquely used.

PROPPATCHback to summary
public static final HttpMethod PROPPATCH

The RFC 2518/4918 PROPPATCH method, this instance is interned and uniquely used.

PUTback to summary
public static final HttpMethod PUT

The RFC 2616 PUT method, this instance is interned and uniquely used.

REPORTback to summary
public static final HttpMethod REPORT

The RFC 3253 REPORT method, this instance is interned and uniquely used.

TRACEback to summary
public static final HttpMethod TRACE

The RFC 2616 TRACE method, this instance is interned and uniquely used.

UNCHECKOUTback to summary
public static final HttpMethod UNCHECKOUT

The RFC 3253 UNCHECKOUT method, this instance is interned and uniquely used.

UNLOCKback to summary
public static final HttpMethod UNLOCK

The RFC 2518/4918 UNLOCK method, this instance is interned and uniquely used.

UPDATEback to summary
public static final HttpMethod UPDATE

The RFC 3253 UPDATE method, this instance is interned and uniquely used.

VERSION_CONTROLback to summary
public static final HttpMethod VERSION_CONTROL

The RFC 3253 VERSION_CONTROL method, this instance is interned and uniquely used.

Constructor Detail

HttpMethodback to summary
public HttpMethod(String name)
HttpMethodback to summary
private HttpMethod(HttpMethod nettyMethod)

Method Detail

_fromNettyback to summary
private static HttpMethod _fromNetty(HttpMethod sMethod)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
fromNettyback to summary
public static HttpMethod fromNetty(HttpMethod method)

Lookup the HttpMethod value for the specified nettyMethod.
The predefined method constants GET, POST, PUT, HEAD, OPTIONS, DELETE, TRACE, CONNECT and PATCH are interned and will be returned when case sensitively matching their string value (i.e "GET", etc...)
Otherwise a new instance is returned.

Parameters
method:HttpMethod

the netty method

Returns:HttpMethod

the HttpMethod instance for the specified netty method

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
nameback to summary
public String name()
Returns:String

the method name

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

toNettyback to summary
public HttpMethod toNetty()
Returns:HttpMethod

the wrapped Netty method instance

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

the same value than name()

valueOfback to summary
public static HttpMethod valueOf(String value)

Lookup the HttpMethod value for the specified value.
The predefined method constants GET, POST, PUT, HEAD, OPTIONS, DELETE, TRACE, CONNECT and PATCH are interned and will be returned when case sensitively matching their string value (i.e "GET", etc...)
Otherwise a new instance is returned.

Parameters
value:String

the value

Returns:HttpMethod

the HttpMethod instance for the specified string value

Exceptions
IllegalArgumentException:
when the value is incorrect, the value is empty or contains an invalid char
valuesback to summary
public static List<HttpMethod> values()
Returns:List<HttpMethod>

an un-modifiable list of known HTTP methods