类 DownloadLifeCycle
java.lang.Object
com.dtflys.forest.lifecycles.file.DownloadLifeCycle
- 所有已实现的接口:
OnCanceled,OnError,OnLoadCookie,OnProgress,OnRedirection,OnRetry,OnSaveCookie,OnSuccess<Object>,Interceptor<Object>,MethodAnnotationLifeCycle<DownloadFile,Object>
public class DownloadLifeCycle
extends Object
implements MethodAnnotationLifeCycle<DownloadFile,Object>
文件下载生命周期
- 从以下版本开始:
- 2020-08-04 02:29
- 作者:
- gongjun[dt_flys@hotmail.com]
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanbeforeExecute(ForestRequest request) 默认回调函数: 请求执行前调用该方法voidonInvokeMethod(ForestRequest request, ForestMethod method, Object[] args) 默认回调函数: 接口方法执行时调用该方法voidonMethodInitialized(ForestMethod method, DownloadFile annotation) voidonProgress(ForestProgress progress) 默认文件上传或下载监听传输进度时调用该方法voidonSuccess(Object data, ForestRequest request, ForestResponse response) 默认回调函数: 请求成功后调用该方法从类继承的方法 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, onRedirection, onRetry, onSaveCookie从接口继承的方法 com.dtflys.forest.lifecycles.MethodAnnotationLifeCycle
onError
-
字段详细资料
-
ATTACHMENT_NAME_FILE
- 另请参阅:
-
-
构造器详细资料
-
DownloadLifeCycle
public DownloadLifeCycle()
-
-
方法详细资料
-
onMethodInitialized
-
onInvokeMethod
从接口复制的说明:Interceptor默认回调函数: 接口方法执行时调用该方法默认为什么都不做
- 指定者:
onInvokeMethod在接口中Interceptor<Object>- 参数:
request- Forest请求对象method- Forest方法对象args- 方法调用入参数组
-
beforeExecute
从接口复制的说明:Interceptor默认回调函数: 请求执行前调用该方法其返回值为布尔类型,可以控制请求是否继续执行
默认为什么都不做
- 指定者:
beforeExecute在接口中Interceptor<Object>- 参数:
request- Forest请求对象- 返回:
true: 继续执行该请求, 否则中断请求
-
onProgress
从接口复制的说明:Interceptor默认文件上传或下载监听传输进度时调用该方法默认为什么都不做
- 指定者:
onProgress在接口中Interceptor<Object>- 指定者:
onProgress在接口中OnProgress- 参数:
progress- Forest进度对象
-
onSuccess
从接口复制的说明:Interceptor默认回调函数: 请求成功后调用该方法默认为什么都不做
- 指定者:
onSuccess在接口中Interceptor<Object>- 指定者:
onSuccess在接口中MethodAnnotationLifeCycle<DownloadFile,Object> - 指定者:
onSuccess在接口中OnSuccess<Object>- 参数:
data- 请求响应返回后经过序列化后的数据request- Forest请求对象response- Forest响应对象
-