接口 ParameterAnnotationLifeCycle<A extends Annotation,I>
- 类型参数:
A- 注解类I- 返回类型
- 所有超级接口:
Interceptor<I>,OnCanceled,OnError,OnLoadCookie,OnProgress,OnRedirection,OnRetry,OnSaveCookie,OnSuccess<I>
- 所有已知实现类:
AbstractBodyLifeCycle,BinaryBodyLifeCycle,BodyLifeCycle,DataFileLifeCycle,DataObjectLifeCycle,DataParamLifeCycle,FormBodyLifeCycle,HeaderLifeCycle,JSONBodyLifeCycle,JSONQueryLifeCycle,ProtobufBodyLifeCycle,QueryLifeCycle,ReturnLifeCycle,URLEncodeLifeCycle,VariableLifeCycle,XMLBodyLifeCycle
参数注解的生命周期
- 从以下版本开始:
- 2020-08-21 0:22
- 作者:
- gongjun[dt_flys@hotmail.com]
-
方法概要
修饰符和类型方法说明default voidonError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) 默认回调函数: 请求失败后调用该方法voidonParameterInitialized(ForestMethod method, MappingParameter parameter, A annotation) 在被注解修饰的方法参数初始化时被调用default voidonSuccess(I data, ForestRequest request, ForestResponse response) 默认回调函数: 请求成功后调用该方法从接口继承的方法 com.dtflys.forest.interceptor.Interceptor
addAttribute, afterExecute, beforeExecute, getAttribute, getAttribute, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsString, getAttributes, onBodyEncode, onCanceled, onInvokeMethod, onLoadCookie, onProgress, onRedirection, onRetry, onSaveCookie
-
方法详细资料
-
onParameterInitialized
在被注解修饰的方法参数初始化时被调用- 参数:
method-ForestMethod对象parameter-MappingParameter对象annotation- 该生命周期类所绑定的注解对象
-
onSuccess
从接口复制的说明:Interceptor默认回调函数: 请求成功后调用该方法默认为什么都不做
- 指定者:
onSuccess在接口中Interceptor<A extends Annotation>- 指定者:
onSuccess在接口中OnSuccess<A extends Annotation>- 参数:
data- 请求响应返回后经过序列化后的数据request- Forest请求对象response- Forest响应对象
-
onError
从接口复制的说明:Interceptor默认回调函数: 请求失败后调用该方法默认为什么都不做
- 指定者:
onError在接口中Interceptor<A extends Annotation>- 指定者:
onError在接口中OnError- 参数:
ex- 请求失败的异常对象request- Forest请求对象response- Forest响应对象
-