RequestCondition contract by delegating to multiple
RequestCondition types and using a logical conjunction (' && ') to
ensure all conditions match a given request.
When CompositeRequestCondition instances are combined or compared
is expected that (a) they contain the same number of conditions and (b)
conditions at the same index are of the same type. It is acceptable to
provide null conditions or no conditions at all to the constructor.
| Modifier and Type | Field and Description |
|---|---|
| private final RequestConditionHolder[] |
| Access | Constructor and Description |
|---|---|
| public | CompositeRequestCondition(RequestCondition<?>... requestConditions)
Create an instance with 0 or more |
| private |
| requestConditions | back to summary |
|---|---|
| private final RequestConditionHolder[] requestConditions | |
| CompositeRequestCondition | back to summary |
|---|---|
| public CompositeRequestCondition(RequestCondition<?>... requestConditions) Create an instance with 0 or more | |
| CompositeRequestCondition | back to summary |
|---|---|
| private CompositeRequestCondition(RequestConditionHolder[] requestConditions) | |
| assertNumberOfConditions | back to summary |
|---|---|
| private void assertNumberOfConditions(CompositeRequestCondition other) | |
| combine | back to summary |
|---|---|
| public CompositeRequestCondition combine(CompositeRequestCondition other) Implements org. If one instance is empty, return the other. If both instances have conditions, combine the individual conditions after ensuring they are of the same type and number.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(CompositeRequestCondition other, ServerWebExchange exchange) Implements org. If one instance is empty, the other "wins". If both instances have conditions, compare them in the order in which they were provided.
| |
| getConditions | back to summary |
|---|---|
| public List Return the underlying conditions, possibly empty but never | |
| getContent | back to summary |
|---|---|
| protected Collection Implements abstract org. Doc from org. Return the discrete items a request condition is composed of. For example URL patterns, HTTP request methods, param expressions, etc.
| |
| getLength | back to summary |
|---|---|
| private int getLength() | |
| getMatchingCondition | back to summary |
|---|---|
| public CompositeRequestCondition getMatchingCondition(ServerWebExchange exchange) Implements org. Delegate to all contained conditions to match the request and return the resulting "matching" condition instances. An empty
| |
| getToStringInfix | back to summary |
|---|---|
| protected String getToStringInfix() Implements abstract org. Doc from org. The notation to use when printing discrete items of content. For example
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides org. Whether this instance contains 0 conditions or not.
| |
| unwrap | back to summary |
|---|---|
| private List | |
| wrap | back to summary |
|---|---|
| private RequestConditionHolder[] wrap(RequestCondition<?>... rawConditions) | |