接口 MethodAnnotationLifeCycle<A extends Annotation,I>
- 类型参数:
A- 注解类I- 返回类型
- 所有超级接口:
Interceptor<I>,OnCanceled,OnError,OnLoadCookie,OnProgress,OnRedirection,OnRetry,OnSaveCookie,OnSuccess<I>
- 所有已知实现类:
AddressLifeCycle,BackendClientLifeCycle,BackendLifeCycle,BasicAuthLifeCycle,BodyTypeLifeCycle,DecompressGzipLifeCycle,DeleteRequestLifeCycle,DownloadLifeCycle,GetRequestLifeCycle,HeadersLifeCycle,HeadRequestLifeCycle,HttpClientLifeCycle,HTTPProxyLifeCycle,LogEnabledLifeCycle,LogHandlerLifeCycle,OAuth2LifeCycle,OkHttp3LifeCycle,OptionsRequestLifeCycle,PatchRequestLifeCycle,PostRequestLifeCycle,PutRequestLifeCycle,RedirectionLifeCycle,RequestLifeCycle,RetryerLifeCycle,RetryLifeCycle,SSLHostnameVerifierLifeCycle,SSLSocketFactoryBuilderLifeCycle,SuccessLifeCycle,TraceRequestLifeCycle
方法注解的生命周期
-
方法概要
修饰符和类型方法说明default voidonError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) 默认回调函数: 请求失败后调用该方法voidonMethodInitialized(ForestMethod method, 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
-
方法详细资料
-
onMethodInitialized
-
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响应对象
-