Class ExceptionHandlingWebHandler
- java.lang.Object
- org.springframework.web.server.handler.WebHandlerDecorator
- org.springframework.web.server.handler.ExceptionHandlingWebHandler
- All Implemented Interfaces:
WebHandler
public class ExceptionHandlingWebHandler extends WebHandlerDecorator
WebHandler decorator that invokes one or moreWebExceptionHandlersafter the delegateWebHandler.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description ExceptionHandlingWebHandler(WebHandler delegate, List<WebExceptionHandler> handlers)Create anExceptionHandlingWebHandlerfor the given delegate.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<WebExceptionHandler>getExceptionHandlers()Return a read-only list of the configured exception handlers.reactor.core.publisher.Mono<Void>handle(ServerWebExchange exchange)Handle the web server exchange.Methods inherited from class org.springframework.web.server.handler.WebHandlerDecorator
getDelegate, toString
Constructor Detail
ExceptionHandlingWebHandler
public ExceptionHandlingWebHandler(WebHandler delegate, List<WebExceptionHandler> handlers)
Create anExceptionHandlingWebHandlerfor the given delegate.- Parameters:
delegate- the WebHandler delegatehandlers- the WebExceptionHandlers to apply
Method Detail
getExceptionHandlers
public List<WebExceptionHandler> getExceptionHandlers()
Return a read-only list of the configured exception handlers.
handle
public reactor.core.publisher.Mono<Void> handle(ServerWebExchange exchange)
Description copied from interface:WebHandlerHandle the web server exchange.- Specified by:
handlein interfaceWebHandler- Overrides:
handlein classWebHandlerDecorator- Parameters:
exchange- the current server exchange- Returns:
Mono<Void>to indicate when request handling is complete