spring-framework / org.springframework.web.reactive / HandlerAdapter / handle

handle

abstract fun handle(exchange: ServerWebExchange, handler: Any): Mono<HandlerResult>

Handle 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 HandlerResult may produce an error later during result handling implementations are also encouraged to set an exception on the HandlerResult so 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)

Return
Mono that emits a single HandlerResult or none if the request has been fully handled and doesn't require further handling.