public class Route
extends java.lang.Object
Constructor and Description |
---|
Route(int httpMethod,
java.lang.String path,
RequestHandler handler) |
Route(int httpMethod,
java.lang.String path,
java.lang.String acceptType,
RequestHandler handler) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptAllContentTypes() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAcceptType()
Gets the acceptType.
|
RequestHandler |
getHandler() |
int |
getHttpMethod() |
java.lang.String |
getHttpMethodAsString() |
java.lang.String |
getPath() |
int |
hashCode() |
public Route(int httpMethod, java.lang.String path, RequestHandler handler)
httpMethod
- HTTP method HttpRequest.GET
HttpRequest.POST
HttpRequest.DELETE
HttpRequest.PUT
path
- request pathhandler
- request handlerpublic Route(int httpMethod, java.lang.String path, java.lang.String acceptType, RequestHandler handler)
httpMethod
- HTTP method HttpRequest.GET
HttpRequest.POST
HttpRequest.DELETE
HttpRequest.PUT
path
- request pathacceptType
- accepted content typehandler
- request handlerpublic java.lang.String getPath()
public int getHttpMethod()
HttpRequest.GET
HttpRequest.POST
HttpRequest.PUT
HttpRequest.DELETE
getHttpMethodAsString()
can be used to get the string representation of the http method.public java.lang.String getAcceptType()
public RequestHandler getHandler()
public boolean acceptAllContentTypes()
public java.lang.String getHttpMethodAsString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object