类 SelectableReturnValueHandler
java.lang.Object
cn.taketoday.web.handler.SelectableReturnValueHandler
- 所有已实现的接口:
cn.taketoday.core.ArraySizeTrimmer,ReturnValueHandler
public class SelectableReturnValueHandler
extends Object
implements ReturnValueHandler, cn.taketoday.core.ArraySizeTrimmer
select
ReturnValueHandler handler in list- 从以下版本开始:
- 4.0
- 作者:
- TODAY 2021/9/3 23:09
-
字段概要
字段从接口继承的字段 cn.taketoday.web.ReturnValueHandler
NONE_RETURN_VALUE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidhandleReturnValue(RequestContext context, Object handler, Object returnValue) Handle result of the handlerfinal ReturnValueHandlerhandleSelectively(RequestContext context, Object handler, Object returnValue) select a handler and handle return-value with selected handlerfinal ReturnValueHandlerselectHandler(Object handler, Object returnValue) booleansupportsHandler(Object handler) If thisReturnValueHandlersupports the target handlerbooleansupportsReturnValue(Object returnValue) If thisReturnValueHandlersupports the target handler's resultvoid
-
字段详细资料
-
internalHandlers
-
-
构造器详细资料
-
SelectableReturnValueHandler
-
-
方法详细资料
-
supportsHandler
从接口复制的说明:ReturnValueHandlerIf thisReturnValueHandlersupports the target handlerThis method can test this
ReturnValueHandlersupports the target handler in application startup time , static match- 指定者:
supportsHandler在接口中ReturnValueHandler- 参数:
handler- Target HTTP handler- 返回:
- If this
ReturnValueHandlersupports the target handler
-
supportsReturnValue
从接口复制的说明:ReturnValueHandlerIf thisReturnValueHandlersupports the target handler's resultThis method can test this
ReturnValueHandlersupports the target handler in application runtime- 指定者:
supportsReturnValue在接口中ReturnValueHandler- 参数:
returnValue- Target handler's return-value or result- 返回:
- If this
ReturnValueHandlersupports the target handler's result
-
selectHandler
@Nullable public final ReturnValueHandler selectHandler(@Nullable Object handler, @Nullable Object returnValue) - 参数:
returnValue- if returnValue isReturnValueHandler.NONE_RETURN_VALUEmatch handler only- 返回:
- null if returnValue is
ReturnValueHandler.NONE_RETURN_VALUEor no one matched
-
handleReturnValue
public void handleReturnValue(RequestContext context, @Nullable Object handler, @Nullable Object returnValue) throws Exception 从接口复制的说明:ReturnValueHandlerHandle result of the handler- 指定者:
handleReturnValue在接口中ReturnValueHandler- 参数:
context- Current HTTP request contexthandler- Target HTTP handlerreturnValue- Handler execution result- 抛出:
ReturnValueHandlerNotFoundException- not found ReturnValueHandlerException- throws when write data to response
-
handleSelectively
@Nullable public final ReturnValueHandler handleSelectively(RequestContext context, @Nullable Object handler, @Nullable Object returnValue) throws Exception select a handler and handle return-value with selected handler- 参数:
context- current request contexthandler- web request handlerreturnValue- handler execution result- 返回:
- selected handler or which handler handled this result(return-value)
- 抛出:
IOException- throws when write data to responseException
-
getInternalHandlers
-
trimToSize
public void trimToSize()- 指定者:
trimToSize在接口中cn.taketoday.core.ArraySizeTrimmer
-