|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.mvc.condition.AbstractRequestCondition<RequestMethodsRequestCondition> org.springframework.web.servlet.mvc.condition.RequestMethodsRequestCondition
public final class RequestMethodsRequestCondition
A logical disjunction (' || ') request condition that matches a request
against a set of RequestMethod
s.
Constructor Summary | |
---|---|
RequestMethodsRequestCondition(RequestMethod... requestMethods)
Create a new instance with the given request methods. |
Method Summary | |
---|---|
RequestMethodsRequestCondition |
combine(RequestMethodsRequestCondition other)
Returns a new instance with a union of the HTTP request methods from "this" and the "other" instance. |
int |
compareTo(RequestMethodsRequestCondition other,
HttpServletRequest request)
Returns: 0 if the two conditions contain the same number of HTTP request methods. |
protected Collection<RequestMethod> |
getContent()
Return the discrete items a request condition is composed of. |
RequestMethodsRequestCondition |
getMatchingCondition(HttpServletRequest request)
Checks if any of the HTTP request methods match the given request and returns an instance that contains the matching request method only. |
Set<RequestMethod> |
getMethods()
Returns all RequestMethod s contained in this condition. |
protected String |
getToStringInfix()
The notation to use when printing discrete items of content. |
Methods inherited from class org.springframework.web.servlet.mvc.condition.AbstractRequestCondition |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RequestMethodsRequestCondition(RequestMethod... requestMethods)
requestMethods
- 0 or more HTTP request methods;
if, 0 the condition will match to every request.Method Detail |
---|
public Set<RequestMethod> getMethods()
RequestMethod
s contained in this condition.
protected Collection<RequestMethod> getContent()
AbstractRequestCondition
getContent
in class AbstractRequestCondition<RequestMethodsRequestCondition>
null
protected String getToStringInfix()
AbstractRequestCondition
getToStringInfix
in class AbstractRequestCondition<RequestMethodsRequestCondition>
public RequestMethodsRequestCondition combine(RequestMethodsRequestCondition other)
other
- the condition to combine with.public RequestMethodsRequestCondition getMatchingCondition(HttpServletRequest request)
request
- the current request
null
if no request methods match.public int compareTo(RequestMethodsRequestCondition other, HttpServletRequest request)
It is assumed that both instances have been obtained via
getMatchingCondition(HttpServletRequest)
and therefore each instance
contains the matching HTTP request method only or is otherwise empty.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |