A logical disjunction (' || ') request condition to match a request's
'Content-Type' header to a list of media type expressions. Two kinds of
media type expressions are supported, which are described in
RequestMapping.consumes() and RequestMapping.headers()
where the header name is 'Content-Type'. Regardless of which syntax is
used, the semantics are the same.
0 if the two conditions have the same number of expressions
Less than 0 if "this" has more or more specific media type expressions
Greater than 0 if "other" has more or more specific media type expressions
public ConsumesRequestCondition(java.lang.String... consumes)
Creates a new instance from 0 or more "consumes" expressions.
consumes - expressions with the syntax described in
RequestMapping.consumes(); if 0 expressions are provided,
the condition will match to every request
public ConsumesRequestCondition(java.lang.String consumes,
Creates a new instance with "consumes" and "header" expressions.
"Header" expressions where the header name is not 'Content-Type' or have
no header value defined are ignored. If 0 expressions are provided in
total, the condition will match to every request
Checks if any of the contained media type expressions match the given
request 'Content-Type' header and returns an instance that is guaranteed
to contain matching expressions only. The match is performed via
exchange - the current exchange
the same instance if the condition contains no expressions;
or a new condition with matching expressions only;
or null if no expressions match.