public interface Transfer
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
Transfer.TransferState
Enumeration of the possible transfer states.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addProgressListener(ProgressListener listener)
Adds the specified progress listener to the list of listeners receiving updates about this
transfer's progress.
|
String |
getDescription()
Returns a human-readable description of this transfer.
|
TransferProgress |
getProgress()
Returns progress information about this transfer.
|
Transfer.TransferState |
getState()
Returns the current state of this transfer.
|
boolean |
isDone()
Returns whether or not the transfer is finished (i.e. completed successfully, failed, or was
canceled).
|
void |
removeProgressListener(ProgressListener listener)
Removes the specified progress listener from the list of progress listeners receiving updates
about this transfer's progress.
|
void |
waitForCompletion()
Waits for this transfer to complete.
|
CosClientException |
waitForException()
Waits for this transfer to finish and returns any error that occurred, or returns
null if no errors occurred. |
boolean isDone()
true if this transfer is finished (i.e. completed successfully,
failed, or was canceled). Returns false if otherwise.void waitForCompletion()
throws CosClientException,
CosServiceException,
InterruptedException
CosClientException - If any errors were encountered in the client while making the
request or handling the response.CosServiceException - If any errors occurred in Qcloud COS while processing the
request.InterruptedException - If this thread is interrupted while waiting for the transfer to
complete.CosClientException waitForException() throws InterruptedException
null if no errors occurred. This is a blocking call; the current thread will be
suspended until this transfer either fails or completes successfully.null if no errors occurred.InterruptedException - If this thread is interrupted while waiting for the transfer to
complete.String getDescription()
Transfer.TransferState getState()
void addProgressListener(ProgressListener listener)
listener - The progress listener to add.void removeProgressListener(ProgressListener listener)
listener - The progress listener to remove.TransferProgress getProgress()
Copyright © 2022. All rights reserved.