Interface HandlerStrategies
public interface HandlerStrategies
Defines the strategies to be used for processing
HandlerFunctions
.
An instance of this class is immutable. Instances are typically created through the
mutable HandlerStrategies.Builder
: either through builder()
to set up default strategies,
or empty()
to start from scratch.
- Since:
- 5.0
- Author:
- Arjen Poutsma, Juergen Hoeller, Sebastien Deleuze
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerStrategies.Builder
builder()
Return a mutable builder for aHandlerStrategies
with default initialization.static HandlerStrategies.Builder
empty()
Return a mutable, empty builder for aHandlerStrategies
.Return theWebExceptionHandlers
to be used for handling exceptions.Return theLocaleContextResolver
to be used for resolving locale context.Return theHttpMessageReaders
to be used for request body conversion.Return theHttpMessageWriters
to be used for response body conversion.Return theViewResolvers
to be used for view name resolution.Return theWebFilters
to be used for filtering the request and response.static HandlerStrategies
Return a newHandlerStrategies
with default initialization.
-
Method Details
-
messageReaders
List<HttpMessageReader<?>> messageReaders()Return theHttpMessageReaders
to be used for request body conversion.- Returns:
- the message readers
-
messageWriters
List<HttpMessageWriter<?>> messageWriters()Return theHttpMessageWriters
to be used for response body conversion.- Returns:
- the message writers
-
viewResolvers
List<ViewResolver> viewResolvers()Return theViewResolvers
to be used for view name resolution.- Returns:
- the view resolvers
-
webFilters
Return theWebFilters
to be used for filtering the request and response.- Returns:
- the web filters
-
exceptionHandlers
List<WebExceptionHandler> exceptionHandlers()Return theWebExceptionHandlers
to be used for handling exceptions.- Returns:
- the exception handlers
-
localeContextResolver
LocaleContextResolver localeContextResolver()Return theLocaleContextResolver
to be used for resolving locale context.- Returns:
- the locale context resolver
-
withDefaults
Return a newHandlerStrategies
with default initialization.- Returns:
- the new
HandlerStrategies
-
builder
Return a mutable builder for aHandlerStrategies
with default initialization.- Returns:
- the builder
-
empty
Return a mutable, empty builder for aHandlerStrategies
.- Returns:
- the builder
-