Class RequestMappingInfo
java.lang.Object
org.springframework.web.reactive.result.method.RequestMappingInfo
- All Implemented Interfaces:
RequestCondition<RequestMappingInfo>
public final class RequestMappingInfo
extends Object
implements RequestCondition<RequestMappingInfo>
Request mapping information. Encapsulates the following request mapping conditions:
PatternsRequestConditionRequestMethodsRequestConditionParamsRequestConditionHeadersRequestConditionConsumesRequestConditionProducesRequestConditionRequestCondition(optional, custom request condition)
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines a builder for creating a RequestMappingInfo.static classContainer for configuration options used for request mapping purposes. -
Method Summary
Modifier and TypeMethodDescriptioncombine(RequestMappingInfo other) Combines "this" request mapping info (i.e.intcompareTo(RequestMappingInfo other, ServerWebExchange exchange) Compares "this" info (i.e.booleanReturns the "consumes" condition of thisRequestMappingInfo; or instance with 0 consumes expressions, nevernull.Returns the "custom" condition of thisRequestMappingInfo; ornull.Return the mapping paths that are not patterns.Returns the "headers" condition of thisRequestMappingInfo; or instance with 0 header expressions, nevernull.getMatchingCondition(ServerWebExchange exchange) Checks if all conditions in this request mapping info match the provided request and returns a potentially new request mapping info with conditions tailored to the current request.Returns the HTTP request methods of thisRequestMappingInfo; or instance with 0 request methods, nevernull.getName()Return the name for this mapping, ornull.Returns the "parameters" condition of thisRequestMappingInfo; or instance with 0 parameter expressions, nevernull.Returns the URL patterns of thisRequestMappingInfo; or instance with 0 patterns, nevernull.Returns the "produces" condition of thisRequestMappingInfo; or instance with 0 produces expressions, nevernull.Returns the version condition of thisRequestMappingInfo, or an instance without a version.inthashCode()mutate()Return a builder to create a new RequestMappingInfo by modifying this one.static RequestMappingInfo.BuilderCreate a newRequestMappingInfo.Builderwith the given paths.toString()
-
Method Details
-
getName
-
getPatternsCondition
Returns the URL patterns of thisRequestMappingInfo; or instance with 0 patterns, nevernull. -
getDirectPaths
-
getMethodsCondition
Returns the HTTP request methods of thisRequestMappingInfo; or instance with 0 request methods, nevernull. -
getParamsCondition
Returns the "parameters" condition of thisRequestMappingInfo; or instance with 0 parameter expressions, nevernull. -
getHeadersCondition
Returns the "headers" condition of thisRequestMappingInfo; or instance with 0 header expressions, nevernull. -
getConsumesCondition
Returns the "consumes" condition of thisRequestMappingInfo; or instance with 0 consumes expressions, nevernull. -
getProducesCondition
Returns the "produces" condition of thisRequestMappingInfo; or instance with 0 produces expressions, nevernull. -
getVersionCondition
Returns the version condition of thisRequestMappingInfo, or an instance without a version.- Since:
- 7.0
-
getCustomCondition
Returns the "custom" condition of thisRequestMappingInfo; ornull. -
combine
Combines "this" request mapping info (i.e. the current instance) with another request mapping info instance.Example: combine type- and method-level request mappings.
- Specified by:
combinein interfaceRequestCondition<RequestMappingInfo>- Parameters:
other- the condition to combine with.- Returns:
- a new request mapping info instance; never
null
-
getMatchingCondition
Checks if all conditions in this request mapping info match the provided request and returns a potentially new request mapping info with conditions tailored to the current request.For example the returned instance may contain the subset of URL patterns that match to the current request, sorted with best matching patterns on top.
- Specified by:
getMatchingConditionin interfaceRequestCondition<RequestMappingInfo>- Returns:
- a new instance in case all conditions match; or
nullotherwise
-
compareTo
Compares "this" info (i.e. the current instance) with another info in the context of a request.Note: It is assumed both instances have been obtained via
getMatchingCondition(ServerWebExchange)to ensure they have conditions with content relevant to current request.- Specified by:
compareToin interfaceRequestCondition<RequestMappingInfo>
-
equals
-
hashCode
-
toString
-
mutate
Return a builder to create a new RequestMappingInfo by modifying this one.- Returns:
- a builder to create a new, modified instance
- Since:
- 5.3.4
-
paths
Create a newRequestMappingInfo.Builderwith the given paths.- Parameters:
paths- the paths to use
-