|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.mvc.method.RequestMappingInfo
public final class RequestMappingInfo
Encapsulates the following request mapping conditions:
PatternsRequestCondition
RequestMethodsRequestCondition
ParamsRequestCondition
HeadersRequestCondition
ConsumesRequestCondition
ProducesRequestCondition
RequestCondition<?>
(optional, custom request condition)
Field Summary | |
---|---|
private ConsumesRequestCondition |
consumesCondition
|
private RequestConditionHolder |
customConditionHolder
|
private int |
hash
|
private HeadersRequestCondition |
headersCondition
|
private RequestMethodsRequestCondition |
methodsCondition
|
private ParamsRequestCondition |
paramsCondition
|
private PatternsRequestCondition |
patternsCondition
|
private ProducesRequestCondition |
producesCondition
|
Constructor Summary | |
---|---|
RequestMappingInfo(PatternsRequestCondition patterns,
RequestMethodsRequestCondition methods,
ParamsRequestCondition params,
HeadersRequestCondition headers,
ConsumesRequestCondition consumes,
ProducesRequestCondition produces,
RequestCondition<?> custom)
Creates a new instance with the given request conditions. |
|
RequestMappingInfo(RequestMappingInfo info,
RequestCondition<?> customRequestCondition)
Re-create a RequestMappingInfo with the given custom request condition. |
Method Summary | |
---|---|
RequestMappingInfo |
combine(RequestMappingInfo other)
Combines "this" request mapping info (i.e. |
int |
compareTo(RequestMappingInfo other,
HttpServletRequest request)
Compares "this" info (i.e. |
boolean |
equals(java.lang.Object obj)
|
ConsumesRequestCondition |
getConsumesCondition()
Returns the "consumes" condition of this RequestMappingInfo ;
or instance with 0 consumes expressions, never null |
RequestCondition<?> |
getCustomCondition()
Returns the "custom" condition of this RequestMappingInfo ; or null |
HeadersRequestCondition |
getHeadersCondition()
Returns the "headers" condition of this RequestMappingInfo ;
or instance with 0 header expressions, never null |
RequestMappingInfo |
getMatchingCondition(HttpServletRequest request)
Checks if all conditions in this request mapping info match the provided request and returns a potentially new request mapping info with conditions tailored to the current request. |
RequestMethodsRequestCondition |
getMethodsCondition()
Returns the HTTP request methods of this RequestMappingInfo ;
or instance with 0 request methods, never null |
ParamsRequestCondition |
getParamsCondition()
Returns the "parameters" condition of this RequestMappingInfo ;
or instance with 0 parameter expressions, never null |
PatternsRequestCondition |
getPatternsCondition()
Returns the URL patterns of this RequestMappingInfo ;
or instance with 0 patterns, never null |
ProducesRequestCondition |
getProducesCondition()
Returns the "produces" condition of this RequestMappingInfo ;
or instance with 0 produces expressions, never null |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final PatternsRequestCondition patternsCondition
private final RequestMethodsRequestCondition methodsCondition
private final ParamsRequestCondition paramsCondition
private final HeadersRequestCondition headersCondition
private final ConsumesRequestCondition consumesCondition
private final ProducesRequestCondition producesCondition
private final RequestConditionHolder customConditionHolder
private int hash
Constructor Detail |
---|
public RequestMappingInfo(PatternsRequestCondition patterns, RequestMethodsRequestCondition methods, ParamsRequestCondition params, HeadersRequestCondition headers, ConsumesRequestCondition consumes, ProducesRequestCondition produces, RequestCondition<?> custom)
public RequestMappingInfo(RequestMappingInfo info, RequestCondition<?> customRequestCondition)
Method Detail |
---|
public PatternsRequestCondition getPatternsCondition()
RequestMappingInfo
;
or instance with 0 patterns, never null
public RequestMethodsRequestCondition getMethodsCondition()
RequestMappingInfo
;
or instance with 0 request methods, never null
public ParamsRequestCondition getParamsCondition()
RequestMappingInfo
;
or instance with 0 parameter expressions, never null
public HeadersRequestCondition getHeadersCondition()
RequestMappingInfo
;
or instance with 0 header expressions, never null
public ConsumesRequestCondition getConsumesCondition()
RequestMappingInfo
;
or instance with 0 consumes expressions, never null
public ProducesRequestCondition getProducesCondition()
RequestMappingInfo
;
or instance with 0 produces expressions, never null
public RequestCondition<?> getCustomCondition()
RequestMappingInfo
; or null
public RequestMappingInfo combine(RequestMappingInfo other)
Example: combine type- and method-level request mappings.
combine
in interface RequestCondition<RequestMappingInfo>
other
- the condition to combine with.
null
public RequestMappingInfo getMatchingCondition(HttpServletRequest request)
For example the returned instance may contain the subset of URL patterns that match to the current request, sorted with best matching patterns on top.
getMatchingCondition
in interface RequestCondition<RequestMappingInfo>
null
otherwisepublic int compareTo(RequestMappingInfo other, HttpServletRequest request)
Note: it is assumed both instances have been obtained via
getMatchingCondition(HttpServletRequest)
to ensure they have conditions with
content relevant to current request.
compareTo
in interface RequestCondition<RequestMappingInfo>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |