Package net.officefloor.server.http
Class HttpMethod
- java.lang.Object
-
- net.officefloor.server.http.HttpMethod
-
- All Implemented Interfaces:
java.io.Serializable
public class HttpMethod extends java.lang.Object implements java.io.Serializable
HTTP method.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpMethod.HttpMethodEnum
HttpMethod
Enum
for common HTTP methods.
-
Field Summary
Fields Modifier and Type Field Description static HttpMethod
CONNECT
CONNECTHttpMethod
singleton.static HttpMethod
DELETE
DELETEHttpMethod
singleton.static HttpMethod
GET
GETHttpMethod
singleton.static HttpMethod
HEAD
HEADHttpMethod
singleton.static HttpMethod
OPTIONS
OPTIONSHttpMethod
singleton.static HttpMethod
POST
POSTHttpMethod
singleton.static HttpMethod
PUT
PUTHttpMethod
singleton.
-
Constructor Summary
Constructors Constructor Description HttpMethod(java.lang.String name)
Instantiate a dynamicHttpMethod
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
HttpMethod.HttpMethodEnum
getEnum()
Obtains theHttpMethod.HttpMethodEnum
for thisHttpMethod
.static HttpMethod
getHttpMethod(java.lang.String methodName)
Obtains theHttpMethod
.java.lang.String
getName()
Obtains theHttpMethod
name.int
hashCode()
boolean
isEqual(HttpMethod httpMethod)
Equals without the type checking.java.lang.String
toString()
-
-
-
Field Detail
-
CONNECT
public static HttpMethod CONNECT
CONNECTHttpMethod
singleton.
-
DELETE
public static HttpMethod DELETE
DELETEHttpMethod
singleton.
-
GET
public static HttpMethod GET
GETHttpMethod
singleton.
-
HEAD
public static HttpMethod HEAD
HEADHttpMethod
singleton.
-
OPTIONS
public static HttpMethod OPTIONS
OPTIONSHttpMethod
singleton.
-
PUT
public static HttpMethod PUT
PUTHttpMethod
singleton.
-
POST
public static HttpMethod POST
POSTHttpMethod
singleton.
-
-
Constructor Detail
-
HttpMethod
public HttpMethod(java.lang.String name)
Instantiate a dynamicHttpMethod
.- Parameters:
name
- Name of theHttpMethod
.
-
-
Method Detail
-
getHttpMethod
public static HttpMethod getHttpMethod(java.lang.String methodName)
Obtains theHttpMethod
.- Parameters:
methodName
- Name of theHttpMethod
.- Returns:
HttpMethod
.
-
isEqual
public boolean isEqual(HttpMethod httpMethod)
Equals without the type checking.- Parameters:
httpMethod
-HttpMethod
.- Returns:
true
if sameHttpMethod
.
-
getEnum
public HttpMethod.HttpMethodEnum getEnum()
Obtains theHttpMethod.HttpMethodEnum
for thisHttpMethod
.- Returns:
HttpMethod.HttpMethodEnum
.
-
getName
public java.lang.String getName()
Obtains theHttpMethod
name.- Returns:
HttpMethod
name.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-