Package spark.http.matching
Class RouteContext
- java.lang.Object
-
- spark.http.matching.RouteContext
-
final class RouteContext extends java.lang.Object
Holds the parameters needed in the Before filters, Routes and After filters execution.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
acceptType
private Body
body
private HttpMethod
httpMethod
private javax.servlet.http.HttpServletRequest
httpRequest
private RequestWrapper
requestWrapper
private Response
response
private ResponseWrapper
responseWrapper
private Routes
routeMatcher
private java.lang.String
uri
-
Constructor Summary
Constructors Modifier Constructor Description private
RouteContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
acceptType()
Body
body()
(package private) static RouteContext
create()
Creates a RouteContextHttpMethod
httpMethod()
javax.servlet.http.HttpServletRequest
httpRequest()
RequestWrapper
requestWrapper()
Response
response()
ResponseWrapper
responseWrapper()
Routes
routeMatcher()
java.lang.String
uri()
RouteContext
withAcceptType(java.lang.String acceptType)
RouteContext
withBody(Body body)
RouteContext
withHttpMethod(HttpMethod httpMethod)
RouteContext
withHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)
RouteContext
withMatcher(Routes routeMatcher)
RouteContext
withRequestWrapper(RequestWrapper requestWrapper)
RouteContext
withResponse(Response response)
RouteContext
withResponseWrapper(ResponseWrapper responseWrapper)
RouteContext
withUri(java.lang.String uri)
-
-
-
Field Detail
-
routeMatcher
private Routes routeMatcher
-
httpRequest
private javax.servlet.http.HttpServletRequest httpRequest
-
uri
private java.lang.String uri
-
acceptType
private java.lang.String acceptType
-
body
private Body body
-
requestWrapper
private RequestWrapper requestWrapper
-
responseWrapper
private ResponseWrapper responseWrapper
-
response
private Response response
-
httpMethod
private HttpMethod httpMethod
-
-
Method Detail
-
create
static RouteContext create()
Creates a RouteContext
-
routeMatcher
public Routes routeMatcher()
-
withMatcher
public RouteContext withMatcher(Routes routeMatcher)
-
withHttpRequest
public RouteContext withHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)
-
withAcceptType
public RouteContext withAcceptType(java.lang.String acceptType)
-
withBody
public RouteContext withBody(Body body)
-
withRequestWrapper
public RouteContext withRequestWrapper(RequestWrapper requestWrapper)
-
withUri
public RouteContext withUri(java.lang.String uri)
-
withResponseWrapper
public RouteContext withResponseWrapper(ResponseWrapper responseWrapper)
-
withResponse
public RouteContext withResponse(Response response)
-
withHttpMethod
public RouteContext withHttpMethod(HttpMethod httpMethod)
-
httpRequest
public javax.servlet.http.HttpServletRequest httpRequest()
-
uri
public java.lang.String uri()
-
acceptType
public java.lang.String acceptType()
-
body
public Body body()
-
requestWrapper
public RequestWrapper requestWrapper()
-
responseWrapper
public ResponseWrapper responseWrapper()
-
response
public Response response()
-
httpMethod
public HttpMethod httpMethod()
-
-