接口 BaseAnnotationLifeCycle<A extends Annotation,I>
- 所有超级接口:
Interceptor<I>,OnCanceled,OnError,OnLoadCookie,OnProgress,OnRedirection,OnRetry,OnSaveCookie,OnSuccess<I>
- 从以下版本开始:
- 2020-08-23 23:04
- 作者:
- gongjun[dt_flys@hotmail.com]
-
方法概要
修饰符和类型方法说明default voidonError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) 默认回调函数: 请求失败后调用该方法default voidonProxyHandlerInitialized(InterfaceProxyHandler interfaceProxyHandler, 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
-
方法详细资料
-
onProxyHandlerInitialized
在被注解修饰的接口初始化时被调用- 参数:
interfaceProxyHandler- 请求接口动态代理处理器annotation- 该生命周期类所绑定的注解
-
onError
从接口复制的说明:Interceptor默认回调函数: 请求失败后调用该方法默认为什么都不做
- 指定者:
onError在接口中Interceptor<A extends Annotation>- 指定者:
onError在接口中OnError- 参数:
ex- 请求失败的异常对象request- Forest请求对象response- Forest响应对象
-
onSuccess
从接口复制的说明:Interceptor默认回调函数: 请求成功后调用该方法默认为什么都不做
- 指定者:
onSuccess在接口中Interceptor<A extends Annotation>- 指定者:
onSuccess在接口中OnSuccess<A extends Annotation>- 参数:
data- 请求响应返回后经过序列化后的数据request- Forest请求对象response- Forest响应对象
-