public class DownloadImpl extends AbstractTransfer implements Download
Transfer.TransferStatemonitor, progressListenerChain, state, stateChangeListeners| Constructor and Description |
|---|
DownloadImpl(java.lang.String description,
TransferProgress transferProgress,
ProgressListenerChain progressListenerChain,
S3Object s3Object,
TransferStateChangeListener listener,
GetObjectRequest getObjectRequest,
java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Cancels this download.
|
void |
abortWithoutNotifyingStateChangeListener()
Cancels this download, but skip notifying the state change listeners.
|
java.lang.String |
getBucketName()
The name of the bucket where the object is being downloaded from.
|
java.lang.String |
getKey()
The key under which this object was stored in Amazon S3.
|
ObjectMetadata |
getObjectMetadata()
Returns the ObjectMetadata for the object being downloaded.
|
PersistableDownload |
pause()
Pause the current download operation and returns the information that can
be used to resume the download at a later time.
|
void |
setS3Object(S3Object s3Object)
Set the S3 object to download.
|
void |
setState(Transfer.TransferState state)
This method is also responsible for firing COMPLETED signal to the
listeners.
|
addProgressListener, addProgressListener, addStateChangeListener, fireProgressEvent, getDescription, getMonitor, getProgress, getState, isDone, notifyStateChangeListeners, removeProgressListener, removeProgressListener, removeStateChangeListener, rethrowExecutionException, setMonitor, unwrapExecutionException, waitForCompletion, waitForExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddProgressListener, addProgressListener, getDescription, getProgress, getState, isDone, removeProgressListener, removeProgressListener, waitForCompletion, waitForExceptionpublic DownloadImpl(java.lang.String description,
TransferProgress transferProgress,
ProgressListenerChain progressListenerChain,
S3Object s3Object,
TransferStateChangeListener listener,
GetObjectRequest getObjectRequest,
java.io.File file)
public ObjectMetadata getObjectMetadata()
getObjectMetadata in interface Downloadpublic java.lang.String getBucketName()
getBucketName in interface Downloadpublic java.lang.String getKey()
public void abort()
throws java.io.IOException
public void abortWithoutNotifyingStateChangeListener()
throws java.io.IOException
java.io.IOExceptionpublic void setS3Object(S3Object s3Object)
public void setState(Transfer.TransferState state)
setState in class AbstractTransferpublic PersistableDownload pause() throws PauseException
DownloadCryptoMode.StrictAuthenticatedEncryption would result in
AmazonClientException as authenticity cannot be guaranteed for a range
get operation.pause in interface DownloadPauseException - If any errors were encountered while trying to pause the
download.