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.SerializableHTTP method.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpMethod.HttpMethodEnumHttpMethodEnumfor common HTTP methods.
-
Field Summary
Fields Modifier and Type Field Description static HttpMethodCONNECTCONNECTHttpMethodsingleton.static HttpMethodDELETEDELETEHttpMethodsingleton.static HttpMethodGETGETHttpMethodsingleton.static HttpMethodHEADHEADHttpMethodsingleton.static HttpMethodOPTIONSOPTIONSHttpMethodsingleton.static HttpMethodPOSTPOSTHttpMethodsingleton.static HttpMethodPUTPUTHttpMethodsingleton.
-
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 booleanequals(java.lang.Object obj)HttpMethod.HttpMethodEnumgetEnum()Obtains theHttpMethod.HttpMethodEnumfor thisHttpMethod.static HttpMethodgetHttpMethod(java.lang.String methodName)Obtains theHttpMethod.java.lang.StringgetName()Obtains theHttpMethodname.inthashCode()booleanisEqual(HttpMethod httpMethod)Equals without the type checking.java.lang.StringtoString()
-
-
-
Field Detail
-
CONNECT
public static HttpMethod CONNECT
CONNECTHttpMethodsingleton.
-
DELETE
public static HttpMethod DELETE
DELETEHttpMethodsingleton.
-
GET
public static HttpMethod GET
GETHttpMethodsingleton.
-
HEAD
public static HttpMethod HEAD
HEADHttpMethodsingleton.
-
OPTIONS
public static HttpMethod OPTIONS
OPTIONSHttpMethodsingleton.
-
PUT
public static HttpMethod PUT
PUTHttpMethodsingleton.
-
POST
public static HttpMethod POST
POSTHttpMethodsingleton.
-
-
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:
trueif sameHttpMethod.
-
getEnum
public HttpMethod.HttpMethodEnum getEnum()
Obtains theHttpMethod.HttpMethodEnumfor thisHttpMethod.- Returns:
HttpMethod.HttpMethodEnum.
-
getName
public java.lang.String getName()
Obtains theHttpMethodname.- Returns:
HttpMethodname.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-