Package org.springframework.web.reactive
Interface HandlerAdapter
- All Known Implementing Classes:
- HandlerFunctionAdapter,- RequestMappingHandlerAdapter,- SimpleHandlerAdapter,- WebSocketHandlerAdapter
public interface HandlerAdapter
Contract that decouples the 
DispatcherHandler from the details of
 invoking a handler and makes it possible to support any handler type.- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Sebastien Deleuze
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<HandlerResult>handle(ServerWebExchange exchange, Object handler) Handle the request with the given handler.booleanWhether thisHandlerAdaptersupports the givenhandler.
- 
Method Details- 
supportsWhether thisHandlerAdaptersupports the givenhandler.- Parameters:
- handler- the handler object to check
- Returns:
- whether or not the handler is supported
 
- 
handleHandle the request with the given handler.Implementations are encouraged to handle exceptions resulting from the invocation of a handler in order and if necessary to return an alternate result that represents an error response. Furthermore since an async HandlerResultmay produce an error later during result handling implementations are also encouraged toset an exception handleron theHandlerResultso that may also be applied later after result handling.- Parameters:
- exchange- current server exchange
- handler- the selected handler which must have been previously checked via- supports(Object)
- Returns:
- Monothat emits a single- HandlerResultor none if the request has been fully handled and doesn't require further handling.
 
 
-