public class ReturnTypeLifeCycle extends Object implements ParameterAnnotationLifeCycle<ReturnType,Object>
Constructor and Description |
---|
ReturnTypeLifeCycle() |
Modifier and Type | Method and Description |
---|---|
boolean |
beforeExecute(ForestRequest request)
默认回调函数: 请求执行前调用该方法
|
void |
onParameterInitialized(ForestMethod method,
MappingParameter parameter,
ReturnType annotation)
在被注解修饰的方法参数初始化时被调用
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onError, onSuccess
addAttribute, afterExecute, getAttribute, getAttribute, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsString, getAttributes, onInvokeMethod, onLoadCookie, onProgress, onRedirection, onRetry, onSaveCookie
public void onParameterInitialized(ForestMethod method, MappingParameter parameter, ReturnType annotation)
ParameterAnnotationLifeCycle
onParameterInitialized
in interface ParameterAnnotationLifeCycle<ReturnType,Object>
method
- ForestMethod
对象parameter
- MappingParameter
对象annotation
- 该生命周期类所绑定的注解对象public boolean beforeExecute(ForestRequest request)
Interceptor
其返回值为布尔类型,可以控制请求是否继续执行
默认为什么都不做
beforeExecute
in interface Interceptor<Object>
request
- Forest请求对象true
: 继续执行该请求, 否则中断请求Copyright © 2022. All rights reserved.