public final class HttpTask<T> extends QCloudTask<HttpResult<T>>
QCloudTask.OnRequestWeightListener
限定符和类型 | 字段和说明 |
---|---|
protected QCloudCredentialProvider |
credentialProvider |
protected HttpRequest<T> |
httpRequest |
protected HttpResult<T> |
httpResult |
protected HttpTaskMetrics |
metrics |
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, STATE_COMPLETE, STATE_EXECUTING, STATE_QUEUEING, WEIGHT_HIGH, WEIGHT_LOW, WEIGHT_NORMAL
限定符和类型 | 方法和说明 |
---|---|
HttpTask<T> |
attachMetric(HttpTaskMetrics httpMetric) |
void |
cancel() |
void |
convertResponse(okhttp3.Response response) |
protected HttpResult<T> |
execute() |
double |
getAverageStreamingSpeed(long networkMillsTook) |
HttpResult<T> |
getResult() |
long |
getTransferBodySize() |
boolean |
isDownloadTask() |
boolean |
isResponseFilePathConverter() |
boolean |
isSuccessful() |
boolean |
isUploadTask() |
HttpTaskMetrics |
metrics() |
HttpRequest<T> |
request() |
HttpTask<T> |
schedule() |
HttpTask<T> |
schedule(int priority) |
HttpTask<T> |
scheduleOn(java.util.concurrent.Executor executor) |
HttpTask<T> |
scheduleOn(java.util.concurrent.Executor executor,
int priority) |
addProgressListener, addProgressListeners, addResultListener, addResultListeners, addStateListener, addStateListeners, call, cast, executeNow, executeNowSilently, getAllProgressListeners, getAllResultListeners, getAllStateListeners, getDownloadMaxThreadCount, getException, getIdentifier, getState, getTag, getUploadMaxThreadCount, getWeight, isCanceled, isCompleted, isEnableTraffic, isExecuting, observeOn, onFailure, onProgress, onStateChanged, onSuccess, removeAllListeners, removeProgressListener, removeResultListener, removeStateListener, scheduleOn, scheduleOn, setDownloadMaxThreadCount, setOnRequestWeightListener, setTransferThreadControl, setUploadMaxThreadCount
protected final HttpRequest<T> httpRequest
protected final QCloudCredentialProvider credentialProvider
protected HttpResult<T> httpResult
protected HttpTaskMetrics metrics
public boolean isSuccessful()
public HttpResult<T> getResult()
getResult
在类中 QCloudTask<HttpResult<T>>
public HttpTask<T> attachMetric(HttpTaskMetrics httpMetric)
public HttpTaskMetrics metrics()
public boolean isUploadTask()
public boolean isDownloadTask()
public boolean isResponseFilePathConverter()
public HttpRequest<T> request()
public long getTransferBodySize()
public double getAverageStreamingSpeed(long networkMillsTook)
public void cancel()
cancel
在类中 QCloudTask<HttpResult<T>>
protected HttpResult<T> execute() throws QCloudClientException, QCloudServiceException
execute
在类中 QCloudTask<HttpResult<T>>
QCloudClientException
QCloudServiceException
public void convertResponse(okhttp3.Response response) throws QCloudClientException, QCloudServiceException