Package io.vertx.core.http
Class HttpMethod
- java.lang.Object
-
- io.vertx.core.http.HttpMethod
-
public class HttpMethod extends Object
Represents an HTTP method.- Author:
- Tim Fox, Paulo Lopes
-
-
Field Summary
Fields Modifier and Type Field Description static HttpMethodACLThe RFC 3744ACLmethod, this instance is interned and uniquely used.static HttpMethodBASELINE_CONTROLThe RFC 3253BASELINE_CONTROLmethod, this instance is interned and uniquely used.static HttpMethodCHECKINThe RFC 3253CHECKINmethod, this instance is interned and uniquely used.static HttpMethodCHECKOUTThe RFC 3253CHECKOUTmethod, this instance is interned and uniquely used.static HttpMethodCONNECTThe RFC 2616CONNECTmethod, this instance is interned and uniquely used.static HttpMethodCOPYThe RFC 2518/4918COPYmethod, this instance is interned and uniquely used.static HttpMethodDELETEThe RFC 2616DELETEmethod, this instance is interned and uniquely used.static HttpMethodGETThe RFC 2616GETmethod, this instance is interned and uniquely used.static HttpMethodHEADThe RFC 2616HEADmethod, this instance is interned and uniquely used.static HttpMethodLABELThe RFC 3253LABELmethod, this instance is interned and uniquely used.static HttpMethodLOCKThe RFC 2518/4918LOCKmethod, this instance is interned and uniquely used.static HttpMethodMERGEThe RFC 3253MERGEmethod, this instance is interned and uniquely used.static HttpMethodMKACTIVITYThe RFC 3253MKACTIVITYmethod, this instance is interned and uniquely used.static HttpMethodMKCALENDARThe RFC 4791MKCALENDARmethod, this instance is interned and uniquely used.static HttpMethodMKCOLThe RFC 2518/4918MKCOLmethod, this instance is interned and uniquely used.static HttpMethodMKWORKSPACEThe RFC 3253MKWORKSPACEmethod, this instance is interned and uniquely used.static HttpMethodMOVEThe RFC 2518/4918MOVEmethod, this instance is interned and uniquely used.static HttpMethodOPTIONSThe RFC 2616OPTIONSmethod, this instance is interned and uniquely used.static HttpMethodORDERPATCHThe RFC 3648ORDERPATCHmethod, this instance is interned and uniquely used.static HttpMethodPATCHThe RFC 5789PATCHmethod, this instance is interned and uniquely used.static HttpMethodPOSTThe {RFC 2616 @code POST} method, this instance is interned and uniquely used.static HttpMethodPROPFINDThe RFC 2518/4918PROPFINDmethod, this instance is interned and uniquely used.static HttpMethodPROPPATCHThe RFC 2518/4918PROPPATCHmethod, this instance is interned and uniquely used.static HttpMethodPUTThe RFC 2616PUTmethod, this instance is interned and uniquely used.static HttpMethodREPORTThe RFC 3253REPORTmethod, this instance is interned and uniquely used.static HttpMethodSEARCHThe RFC 5323SEARCHmethod, this instance is interned and uniquely used.static HttpMethodTRACEThe RFC 2616TRACEmethod, this instance is interned and uniquely used.static HttpMethodUNCHECKOUTThe RFC 3253UNCHECKOUTmethod, this instance is interned and uniquely used.static HttpMethodUNLOCKThe RFC 2518/4918UNLOCKmethod, this instance is interned and uniquely used.static HttpMethodUPDATEThe RFC 3253UPDATEmethod, this instance is interned and uniquely used.static HttpMethodVERSION_CONTROLThe RFC 3253VERSION_CONTROLmethod, this instance is interned and uniquely used.
-
Constructor Summary
Constructors Constructor Description HttpMethod(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static HttpMethodfromNetty(HttpMethod method)Lookup theHttpMethodvalue for the specifiednettyMethod.inthashCode()Stringname()JsonObjecttoJson()HttpMethodtoNetty()StringtoString()static HttpMethodvalueOf(String value)Lookup theHttpMethodvalue for the specifiedvalue.static List<HttpMethod>values()
-
-
-
Field Detail
-
OPTIONS
public static final HttpMethod OPTIONS
The RFC 2616OPTIONSmethod, this instance is interned and uniquely used.
-
GET
public static final HttpMethod GET
The RFC 2616GETmethod, this instance is interned and uniquely used.
-
HEAD
public static final HttpMethod HEAD
The RFC 2616HEADmethod, this instance is interned and uniquely used.
-
POST
public static final HttpMethod POST
The {RFC 2616 @code POST} method, this instance is interned and uniquely used.
-
PUT
public static final HttpMethod PUT
The RFC 2616PUTmethod, this instance is interned and uniquely used.
-
DELETE
public static final HttpMethod DELETE
The RFC 2616DELETEmethod, this instance is interned and uniquely used.
-
TRACE
public static final HttpMethod TRACE
The RFC 2616TRACEmethod, this instance is interned and uniquely used.
-
CONNECT
public static final HttpMethod CONNECT
The RFC 2616CONNECTmethod, this instance is interned and uniquely used.
-
PATCH
public static final HttpMethod PATCH
The RFC 5789PATCHmethod, this instance is interned and uniquely used.
-
PROPFIND
public static final HttpMethod PROPFIND
The RFC 2518/4918PROPFINDmethod, this instance is interned and uniquely used.
-
PROPPATCH
public static final HttpMethod PROPPATCH
The RFC 2518/4918PROPPATCHmethod, this instance is interned and uniquely used.
-
MKCOL
public static final HttpMethod MKCOL
The RFC 2518/4918MKCOLmethod, this instance is interned and uniquely used.
-
COPY
public static final HttpMethod COPY
The RFC 2518/4918COPYmethod, this instance is interned and uniquely used.
-
MOVE
public static final HttpMethod MOVE
The RFC 2518/4918MOVEmethod, this instance is interned and uniquely used.
-
LOCK
public static final HttpMethod LOCK
The RFC 2518/4918LOCKmethod, this instance is interned and uniquely used.
-
UNLOCK
public static final HttpMethod UNLOCK
The RFC 2518/4918UNLOCKmethod, this instance is interned and uniquely used.
-
MKCALENDAR
public static final HttpMethod MKCALENDAR
The RFC 4791MKCALENDARmethod, this instance is interned and uniquely used.
-
VERSION_CONTROL
public static final HttpMethod VERSION_CONTROL
The RFC 3253VERSION_CONTROLmethod, this instance is interned and uniquely used.
-
REPORT
public static final HttpMethod REPORT
The RFC 3253REPORTmethod, this instance is interned and uniquely used.
-
CHECKOUT
public static final HttpMethod CHECKOUT
The RFC 3253CHECKOUTmethod, this instance is interned and uniquely used.
-
CHECKIN
public static final HttpMethod CHECKIN
The RFC 3253CHECKINmethod, this instance is interned and uniquely used.
-
UNCHECKOUT
public static final HttpMethod UNCHECKOUT
The RFC 3253UNCHECKOUTmethod, this instance is interned and uniquely used.
-
MKWORKSPACE
public static final HttpMethod MKWORKSPACE
The RFC 3253MKWORKSPACEmethod, this instance is interned and uniquely used.
-
UPDATE
public static final HttpMethod UPDATE
The RFC 3253UPDATEmethod, this instance is interned and uniquely used.
-
LABEL
public static final HttpMethod LABEL
The RFC 3253LABELmethod, this instance is interned and uniquely used.
-
MERGE
public static final HttpMethod MERGE
The RFC 3253MERGEmethod, this instance is interned and uniquely used.
-
BASELINE_CONTROL
public static final HttpMethod BASELINE_CONTROL
The RFC 3253BASELINE_CONTROLmethod, this instance is interned and uniquely used.
-
MKACTIVITY
public static final HttpMethod MKACTIVITY
The RFC 3253MKACTIVITYmethod, this instance is interned and uniquely used.
-
ORDERPATCH
public static final HttpMethod ORDERPATCH
The RFC 3648ORDERPATCHmethod, this instance is interned and uniquely used.
-
ACL
public static final HttpMethod ACL
The RFC 3744ACLmethod, this instance is interned and uniquely used.
-
SEARCH
public static final HttpMethod SEARCH
The RFC 5323SEARCHmethod, this instance is interned and uniquely used.
-
-
Constructor Detail
-
HttpMethod
public HttpMethod(String name)
-
-
Method Detail
-
values
public static List<HttpMethod> values()
- Returns:
- an un-modifiable list of known HTTP methods
-
fromNetty
public static HttpMethod fromNetty(HttpMethod method)
Lookup theHttpMethodvalue for the specifiednettyMethod.
The predefined method constantsGET,POST,PUT,HEAD,OPTIONS,DELETE,TRACE,CONNECTandPATCHare interned and will be returned when case sensitively matching their string value (i.e"GET", etc...)
Otherwise a new instance is returned.- Parameters:
method- the netty method- Returns:
- the
HttpMethodinstance for the specified nettymethod
-
valueOf
public static HttpMethod valueOf(String value)
Lookup theHttpMethodvalue for the specifiedvalue.
The predefined method constantsGET,POST,PUT,HEAD,OPTIONS,DELETE,TRACE,CONNECTandPATCHare interned and will be returned when case sensitively matching their string value (i.e"GET", etc...)
Otherwise a new instance is returned.- Parameters:
value- the value- Returns:
- the
HttpMethodinstance for the specified stringvalue - Throws:
IllegalArgumentException- when the value is incorrect, the value is empty or contains an invalid char
-
toJson
public JsonObject toJson()
-
name
public String name()
- Returns:
- the method name
-
toString
public String toString()
-
toNetty
public HttpMethod toNetty()
- Returns:
- the wrapped Netty method instance
-
-