Package io.microsphere.spring.web.rule
Class WebRequestProducesRule
java.lang.Object
io.microsphere.spring.web.rule.AbstractWebRequestRule<ProduceMediaTypeExpression>
io.microsphere.spring.web.rule.WebRequestProducesRule
- All Implemented Interfaces:
WebRequestRule
WebRequest Produces WebRequestRule
A logical disjunction (' || ') request condition to match a request's 'Accept' header
to a list of media type expressions. Two kinds of media type expressions are
supported, which are described in RequestMapping.produces() and
RequestMapping.headers() where the header name is 'Accept'.
Regardless of which syntax is used, the semantics are the same.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma, Rossen Stoyanchev, Mercy
- See Also:
-
WebRequestRuleorg.springframework.web.servlet.mvc.condition.ProducesRequestConditionorg.springframework.web.reactive.result.condition.ProducesRequestCondition
-
Constructor Summary
ConstructorsConstructorDescriptionWebRequestProducesRule(String... produces) WebRequestProducesRule(String[] produces, String... headers) WebRequestProducesRule(String[] produces, String[] headers, org.springframework.web.accept.ContentNegotiationManager manager) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<ProduceMediaTypeExpression>Return the discrete items a request condition is composed of.protected StringThe notation to use when printing discrete items of content.booleanmatches(org.springframework.web.context.request.NativeWebRequest request) Methods inherited from class io.microsphere.spring.web.rule.AbstractWebRequestRule
equals, hashCode, isEmpty, toString
-
Constructor Details
-
WebRequestProducesRule
-
WebRequestProducesRule
-
WebRequestProducesRule
-
-
Method Details
-
getContent
Description copied from class:AbstractWebRequestRuleReturn the discrete items a request condition is composed of.For example URL patterns, HTTP request methods, param expressions, etc.
- Specified by:
getContentin classAbstractWebRequestRule<ProduceMediaTypeExpression>- Returns:
- a collection of objects (never
null)
-
getToStringInfix
Description copied from class:AbstractWebRequestRuleThe notation to use when printing discrete items of content.For example
" || "for URL patterns or" && "for param expressions.- Specified by:
getToStringInfixin classAbstractWebRequestRule<ProduceMediaTypeExpression>
-
matches
public boolean matches(org.springframework.web.context.request.NativeWebRequest request)
-