类 ReturnLifeCycle
java.lang.Object
com.dtflys.forest.lifecycles.parameter.ReturnLifeCycle
- 所有已实现的接口:
OnCanceled,OnError,OnLoadCookie,OnProgress,OnRedirection,OnRetry,OnSaveCookie,OnSuccess<Object>,Interceptor<Object>,ParameterAnnotationLifeCycle<Return,Object>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanbeforeExecute(ForestRequest request) 默认回调函数: 请求执行前调用该方法voidonInvokeMethod(ForestRequest request, ForestMethod method, Object[] args) 默认回调函数: 接口方法执行时调用该方法voidonParameterInitialized(ForestMethod method, MappingParameter parameter, Return annotation) 在被注解修饰的方法参数初始化时被调用从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.dtflys.forest.interceptor.Interceptor
addAttribute, afterExecute, getAttribute, getAttribute, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsString, getAttributes, onBodyEncode, onCanceled, onLoadCookie, onProgress, onRedirection, onRetry, onSaveCookie从接口继承的方法 com.dtflys.forest.lifecycles.ParameterAnnotationLifeCycle
onError, onSuccess
-
构造器详细资料
-
ReturnLifeCycle
public ReturnLifeCycle()
-
-
方法详细资料
-
onParameterInitialized
public void onParameterInitialized(ForestMethod method, MappingParameter parameter, Return annotation) 从接口复制的说明:ParameterAnnotationLifeCycle在被注解修饰的方法参数初始化时被调用- 指定者:
onParameterInitialized在接口中ParameterAnnotationLifeCycle<Return,Object> - 参数:
method-ForestMethod对象parameter-MappingParameter对象annotation- 该生命周期类所绑定的注解对象
-
onInvokeMethod
从接口复制的说明:Interceptor默认回调函数: 接口方法执行时调用该方法默认为什么都不做
- 指定者:
onInvokeMethod在接口中Interceptor<Object>- 参数:
request- Forest请求对象method- Forest方法对象args- 方法调用入参数组
-
beforeExecute
从接口复制的说明:Interceptor默认回调函数: 请求执行前调用该方法其返回值为布尔类型,可以控制请求是否继续执行
默认为什么都不做
- 指定者:
beforeExecute在接口中Interceptor<Object>- 参数:
request- Forest请求对象- 返回:
true: 继续执行该请求, 否则中断请求
-