Class SimpleHandlerAdapter
- java.lang.Object
- org.springframework.web.reactive.result.SimpleHandlerAdapter
- All Implemented Interfaces:
HandlerAdapter
public class SimpleHandlerAdapter extends Object implements HandlerAdapter
- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Sebastien Deleuze
Constructor Summary
Constructors Constructor Description SimpleHandlerAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<HandlerResult>handle(ServerWebExchange exchange, Object handler)Handle the request with the given handler.booleansupports(Object handler)Whether thisHandlerAdaptersupports the givenhandler.
Constructor Detail
SimpleHandlerAdapter
public SimpleHandlerAdapter()
Method Detail
supports
public boolean supports(Object handler)
Description copied from interface:HandlerAdapterWhether thisHandlerAdaptersupports the givenhandler.- Specified by:
supportsin interfaceHandlerAdapter- Parameters:
handler- the handler object to check- Returns:
- whether or not the handler is supported
handle
public reactor.core.publisher.Mono<HandlerResult> handle(ServerWebExchange exchange, Object handler)
Description copied from interface:HandlerAdapterHandle 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.- Specified by:
handlein interfaceHandlerAdapter- Parameters:
exchange- current server exchangehandler- the selected handler which must have been previously checked viaHandlerAdapter.supports(Object)- Returns:
Monothat emits a singleHandlerResultor none if the request has been fully handled and doesn't require further handling.