public class COSDownloadTask extends COSTransferTask
需要的 COS 权限:HeadObject、GetObject
Created by rickenwang on 2021/6/30. Copyright 2010-2021 Tencent Cloud. All Rights Reserved.
COSTransferTask.TaskThreadFactory
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
TASK_UNKNOWN_STATUS |
bucket, clientException, cosDirect, cosXmlProgressListener, cosXmlRequest, cosXmlResult, cosXmlResultListener, cosXmlServiceConfig, cryptoModuleBase, key, manualCancel, manualPause, mTransferTaskCts, region, serviceException, taskId, transferStateListener, transferTaskMetrics
构造器和说明 |
---|
COSDownloadTask(COSDirect cosDirect,
GetObjectRequest getObjectRequest) |
限定符和类型 | 方法和说明 |
---|---|
void |
cancel()
取消传输,如果是分片上传会调用 abort 接口
|
protected void |
checking()
检查传输参数,并计算额外参数
|
protected CosXmlResult |
execute()
执行上传任务
|
protected java.util.concurrent.Executor |
executor() |
void |
pause()
暂停传输
|
protected java.lang.String |
tag() |
getClientException, getServiceException, getTaskState, getTransferTaskMetrics, isManualCanceled, isManualPaused, loggerInfo, loggerWarn, onTransferFailed, onTransferInProgress, onTransferPaused, onTransferProgressChange, onTransferSuccess, onTransferWaiting, resume, setCosXmlProgressListener, setCosXmlResultListener, setTransferStateListener, start
public static final java.lang.String TASK_UNKNOWN_STATUS
public COSDownloadTask(COSDirect cosDirect, GetObjectRequest getObjectRequest)
protected java.lang.String tag()
tag
在类中 COSTransferTask
protected java.util.concurrent.Executor executor()
executor
在类中 COSTransferTask
public void pause()
COSTransferTask
pause
在类中 COSTransferTask
public void cancel()
COSTransferTask
cancel
在类中 COSTransferTask
protected void checking() throws CosXmlClientException
COSTransferTask
checking
在类中 COSTransferTask
CosXmlClientException
protected CosXmlResult execute() throws java.lang.Exception
COSTransferTask
execute
在类中 COSTransferTask
java.lang.Exception