类 SimpleHandlerAdapter
- java.lang.Object
- org.springframework.web.reactive.result.SimpleHandlerAdapter
- 所有已实现的接口:
HandlerAdapter
public class SimpleHandlerAdapter extends Object implements HandlerAdapter
- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev, Sebastien Deleuze
构造器概要
构造器 构造器 说明 SimpleHandlerAdapter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<HandlerResult>handle(ServerWebExchange exchange, Object handler)Handle the request with the given handler.booleansupports(Object handler)Whether thisHandlerAdaptersupports the givenhandler.
构造器详细资料
SimpleHandlerAdapter
public SimpleHandlerAdapter()
方法详细资料
supports
public boolean supports(Object handler)
从接口复制的说明:HandlerAdapterWhether thisHandlerAdaptersupports the givenhandler.- 指定者:
supports在接口中HandlerAdapter- 参数:
handler- the handler object to check- 返回:
- whether or not the handler is supported
handle
public reactor.core.publisher.Mono<HandlerResult> handle(ServerWebExchange exchange, Object handler)
从接口复制的说明: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.- 指定者:
handle在接口中HandlerAdapter- 参数:
exchange- current server exchangehandler- the selected handler which must have been previously checked viaHandlerAdapter.supports(Object)- 返回:
Monothat emits a singleHandlerResultor none if the request has been fully handled and doesn't require further handling.