Top Description Inners Fields Constructors Methods
org.springframework.web.reactive.result.method

public final Class RequestMappingInfo

extends Object
implements RequestCondition<RequestMappingInfo>
Class Inheritance
All Implemented Interfaces
org.springframework.web.reactive.result.condition.RequestCondition
Imports
java.util.ArrayList, .Collections, .List, .Set, org.springframework.lang.Nullable, org.springframework.util.ObjectUtils, .StringUtils, org.springframework.web.bind.annotation.RequestMethod, org.springframework.web.reactive.accept.RequestedContentTypeResolver, org.springframework.web.reactive.result.condition.ConsumesRequestCondition, .HeadersRequestCondition, .ParamsRequestCondition, .PatternsRequestCondition, .ProducesRequestCondition, .RequestCondition, .RequestConditionHolder, .RequestMethodsRequestCondition, org.springframework.web.server.ServerWebExchange, org.springframework.web.util.pattern.PathPattern, .PathPatternParser

Request mapping information. Encapsulates the following request mapping conditions:
  1. PatternsRequestCondition
  2. RequestMethodsRequestCondition
  3. ParamsRequestCondition
  4. HeadersRequestCondition
  5. ConsumesRequestCondition
  6. ProducesRequestCondition
  7. RequestCondition (optional, custom request condition)
Author
Rossen Stoyanchev
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
RequestMappingInfo.Builder

Defines a builder for creating a RequestMappingInfo.

public static class
RequestMappingInfo.BuilderConfiguration

Container for configuration options used for request mapping purposes.

private static class
private static class

Field Summary

Modifier and TypeField and Description
private final ConsumesRequestCondition
private final RequestConditionHolder
private static final ConsumesRequestCondition
private static final RequestConditionHolder
private static final HeadersRequestCondition
private static final ParamsRequestCondition
private static final PatternsRequestCondition
private static final ProducesRequestCondition
private static final RequestMethodsRequestCondition
private final int
private final HeadersRequestCondition
private final RequestMethodsRequestCondition
private final String
private final RequestMappingInfo.BuilderConfiguration
private final ParamsRequestCondition
private final PatternsRequestCondition
private final ProducesRequestCondition

Constructor Summary

AccessConstructor and Description
public
RequestMappingInfo(String name, PatternsRequestCondition patterns, RequestMethodsRequestCondition methods, ParamsRequestCondition params, HeadersRequestCondition headers, ConsumesRequestCondition consumes, ProducesRequestCondition produces, RequestCondition<?> custom)
Deprecated as of 5.3.4 in favor using RequestMappingInfo.Builder via paths(String...).

Full constructor with a mapping name.

public
RequestMappingInfo(PatternsRequestCondition patterns, RequestMethodsRequestCondition methods, ParamsRequestCondition params, HeadersRequestCondition headers, ConsumesRequestCondition consumes, ProducesRequestCondition produces, RequestCondition<?> custom)
Deprecated as of 5.3.4 in favor using RequestMappingInfo.Builder via paths(String...).

Create an instance with the given conditions.

public
RequestMappingInfo(RequestMappingInfo info, RequestCondition<?> customRequestCondition)
Deprecated since 5.3.4 in favor of using a Builder via mutate().

Re-create a RequestMappingInfo with the given custom request condition.

private

Method Summary

Modifier and TypeMethod and Description
private static int
public RequestMappingInfo

Returns:

a new request mapping info instance; never null
combine
(RequestMappingInfo
the condition to combine with.
other
)

Implements org.springframework.web.reactive.result.condition.RequestCondition.combine.

Combines "this" request mapping info (i.e. the current instance) with another request mapping info instance.

private String
public int
compareTo(RequestMappingInfo other, ServerWebExchange exchange)

Implements org.springframework.web.reactive.result.condition.RequestCondition.compareTo.

Compares "this" info (i.e. the current instance) with another info in the context of a request.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public ConsumesRequestCondition
getConsumesCondition()

Returns the "consumes" condition of this RequestMappingInfo; or instance with 0 consumes expressions, never null.

public RequestCondition<?>
getCustomCondition()

Returns the "custom" condition of this RequestMappingInfo; or null.

public Set<String>
getDirectPaths()

Return the mapping paths that are not patterns.

public HeadersRequestCondition
getHeadersCondition()

Returns the "headers" condition of this RequestMappingInfo; or instance with 0 header expressions, never null.

public RequestMappingInfo

Returns:

a new instance in case all conditions match; or null otherwise
getMatchingCondition
(ServerWebExchange exchange)

Implements org.springframework.web.reactive.result.condition.RequestCondition.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.

public RequestMethodsRequestCondition
getMethodsCondition()

Returns the HTTP request methods of this RequestMappingInfo; or instance with 0 request methods, never null.

public String
getName()

Return the name for this mapping, or null.

public ParamsRequestCondition
getParamsCondition()

Returns the "parameters" condition of this RequestMappingInfo; or instance with 0 parameter expressions, never null.

public PatternsRequestCondition
getPatternsCondition()

Returns the URL patterns of this RequestMappingInfo; or instance with 0 patterns, never null.

public ProducesRequestCondition
getProducesCondition()

Returns the "produces" condition of this RequestMappingInfo; or instance with 0 produces expressions, never null.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public RequestMappingInfo.Builder

Returns:

a builder to create a new, modified instance
mutate
()

Return a builder to create a new RequestMappingInfo by modifying this one.

public static RequestMappingInfo.Builder
paths(String...
the paths to use
paths
)

Create a new RequestMappingInfo.Builder with the given paths.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait