public interface HandlerMapping
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BEST_MATCHING_PATTERN_ATTRIBUTE
Name of the
ServerWebExchange attribute that contains the
best matching pattern within the handler mapping. |
static java.lang.String |
MATRIX_VARIABLES_ATTRIBUTE
Name of the
ServerWebExchange attribute that contains a map with
URI matrix variables. |
static java.lang.String |
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
Name of the
ServerWebExchange attribute that contains the path
within the handler mapping, in case of a pattern match, or the full
relevant URI (typically within the DispatcherServlet's mapping) else. |
static java.lang.String |
PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
Name of the
ServerWebExchange attribute that contains the set of
producible MediaTypes applicable to the mapped handler. |
static java.lang.String |
URI_TEMPLATE_VARIABLES_ATTRIBUTE
Name of the
ServerWebExchange attribute that contains the URI
templates map, mapping variable names to values. |
Modifier and Type | Method and Description |
---|---|
<any> |
getHandler(ServerWebExchange exchange)
Return a handler for this request.
|
static final java.lang.String BEST_MATCHING_PATTERN_ATTRIBUTE
ServerWebExchange
attribute that contains the
best matching pattern within the handler mapping.
Note: This attribute is not required to be supported by all HandlerMapping implementations. URL-based HandlerMappings will typically support it, but handlers should not necessarily expect this request attribute to be present in all scenarios.
static final java.lang.String PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
ServerWebExchange
attribute that contains the path
within the handler mapping, in case of a pattern match, or the full
relevant URI (typically within the DispatcherServlet's mapping) else.
Note: This attribute is not required to be supported by all HandlerMapping implementations. URL-based HandlerMappings will typically support it, but handlers should not necessarily expect this request attribute to be present in all scenarios.
static final java.lang.String URI_TEMPLATE_VARIABLES_ATTRIBUTE
ServerWebExchange
attribute that contains the URI
templates map, mapping variable names to values.
Note: This attribute is not required to be supported by all HandlerMapping implementations. URL-based HandlerMappings will typically support it, but handlers should not necessarily expect this request attribute to be present in all scenarios.
static final java.lang.String MATRIX_VARIABLES_ATTRIBUTE
ServerWebExchange
attribute that contains a map with
URI matrix variables.
Note: This attribute is not required to be supported by all HandlerMapping implementations and may also not be present depending on whether the HandlerMapping is configured to keep matrix variable content in the request URI.
static final java.lang.String PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
ServerWebExchange
attribute that contains the set of
producible MediaTypes applicable to the mapped handler.
Note: This attribute is not required to be supported by all HandlerMapping implementations. Handlers should not necessarily expect this request attribute to be present in all scenarios.
<any> getHandler(ServerWebExchange exchange)
exchange
- current server exchangeMono
that emits one value or none in case the request
cannot be resolved to a handler