Package spark.http.matching
Class RouteContext
- java.lang.Object
-
- spark.http.matching.RouteContext
-
final class RouteContext extends java.lang.ObjectHolds the parameters needed in the Before filters, Routes and After filters execution.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringacceptTypeprivate Bodybodyprivate HttpMethodhttpMethodprivate javax.servlet.http.HttpServletRequesthttpRequestprivate RequestWrapperrequestWrapperprivate Responseresponseprivate ResponseWrapperresponseWrapperprivate RoutesrouteMatcherprivate java.lang.Stringuri
-
Constructor Summary
Constructors Modifier Constructor Description privateRouteContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringacceptType()Bodybody()(package private) static RouteContextcreate()Creates a RouteContextHttpMethodhttpMethod()javax.servlet.http.HttpServletRequesthttpRequest()RequestWrapperrequestWrapper()Responseresponse()ResponseWrapperresponseWrapper()RoutesrouteMatcher()java.lang.Stringuri()RouteContextwithAcceptType(java.lang.String acceptType)RouteContextwithBody(Body body)RouteContextwithHttpMethod(HttpMethod httpMethod)RouteContextwithHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)RouteContextwithMatcher(Routes routeMatcher)RouteContextwithRequestWrapper(RequestWrapper requestWrapper)RouteContextwithResponse(Response response)RouteContextwithResponseWrapper(ResponseWrapper responseWrapper)RouteContextwithUri(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()
-
-