Interface HandlerStrategies
public interface HandlerStrategies
Defines the strategies to be used for processingHandlerFunctions.An instance of this class is immutable. Instances are typically created through the mutable
HandlerStrategies.Builder: either throughbuilder()to set up default strategies, orempty()to start from scratch.- Since:
- 5.0
- Author:
- Arjen Poutsma, Juergen Hoeller, Sebastien Deleuze
- See Also:
RouterFunctions.toHttpHandler(RouterFunction, HandlerStrategies)
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHandlerStrategies.BuilderA mutable builder for aHandlerStrategies.
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static HandlerStrategies.Builderbuilder()Return a mutable builder for aHandlerStrategieswith default initialization.static HandlerStrategies.Builderempty()Return a mutable, empty builder for aHandlerStrategies.List<WebExceptionHandler>exceptionHandlers()Return theWebExceptionHandlersto be used for handling exceptions.LocaleContextResolverlocaleContextResolver()Return theLocaleContextResolverto be used for resolving locale context.List<HttpMessageReader<?>>messageReaders()Return theHttpMessageReadersto be used for request body conversion.List<HttpMessageWriter<?>>messageWriters()Return theHttpMessageWritersto be used for response body conversion.List<ViewResolver>viewResolvers()Return theViewResolversto be used for view name resolution.List<WebFilter>webFilters()Return theWebFiltersto be used for filtering the request and response.static HandlerStrategieswithDefaults()Return a newHandlerStrategieswith default initialization.
Method Detail
messageReaders
List<HttpMessageReader<?>> messageReaders()
Return theHttpMessageReadersto be used for request body conversion.- Returns:
- the message readers
messageWriters
List<HttpMessageWriter<?>> messageWriters()
Return theHttpMessageWritersto be used for response body conversion.- Returns:
- the message writers
viewResolvers
List<ViewResolver> viewResolvers()
Return theViewResolversto be used for view name resolution.- Returns:
- the view resolvers
webFilters
List<WebFilter> webFilters()
Return theWebFiltersto be used for filtering the request and response.- Returns:
- the web filters
exceptionHandlers
List<WebExceptionHandler> exceptionHandlers()
Return theWebExceptionHandlersto be used for handling exceptions.- Returns:
- the exception handlers
localeContextResolver
LocaleContextResolver localeContextResolver()
Return theLocaleContextResolverto be used for resolving locale context.- Returns:
- the locale context resolver
withDefaults
static HandlerStrategies withDefaults()
Return a newHandlerStrategieswith default initialization.- Returns:
- the new
HandlerStrategies
builder
static HandlerStrategies.Builder builder()
Return a mutable builder for aHandlerStrategieswith default initialization.- Returns:
- the builder
empty
static HandlerStrategies.Builder empty()
Return a mutable, empty builder for aHandlerStrategies.- Returns:
- the builder