Package io.microsphere.spring.web.rule
Class WebRequestHeadersRule
java.lang.Object
io.microsphere.spring.web.rule.AbstractWebRequestRule<WebRequestHeaderExpression>
io.microsphere.spring.web.rule.WebRequestHeadersRule
- All Implemented Interfaces:
WebRequestRule
WebRequest
Headers WebRequestRule
A logical conjunction (' && '
) request condition that matches a request against
a set of header expressions with syntax defined in RequestMapping.headers()
.
Expressions passed to the constructor with header names 'Accept' or 'Content-Type' are ignored.
- Since:
- 1.0.066
- Author:
- Arjen Poutsma, Rossen Stoyanchev, Mercy
- See Also:
-
WebRequestRule
org.springframework.web.servlet.mvc.condition.HeadersRequestCondition
org.springframework.web.reactive.result.condition.HeadersRequestCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<WebRequestHeaderExpression>
Return the discrete items a request condition is composed of.protected String
The notation to use when printing discrete items of content.boolean
matches
(org.springframework.web.context.request.NativeWebRequest request) Methods inherited from class io.microsphere.spring.web.rule.AbstractWebRequestRule
equals, hashCode, isEmpty, toString
-
Constructor Details
-
WebRequestHeadersRule
-
-
Method Details
-
getContent
Description copied from class:AbstractWebRequestRule
Return the discrete items a request condition is composed of.For example URL patterns, HTTP request methods, param expressions, etc.
- Specified by:
getContent
in classAbstractWebRequestRule<WebRequestHeaderExpression>
- Returns:
- a collection of objects (never
null
)
-
getToStringInfix
Description copied from class:AbstractWebRequestRule
The notation to use when printing discrete items of content.For example
" || "
for URL patterns or" && "
for param expressions.- Specified by:
getToStringInfix
in classAbstractWebRequestRule<WebRequestHeaderExpression>
-
matches
public boolean matches(org.springframework.web.context.request.NativeWebRequest request)
-