Interface | Description |
---|---|
Copy |
Represents an asynchronous copy request from one Amazon S3 location another.
|
Download |
Represents an asynchronous download from Amazon S3.
|
KeyFilter |
An interface that specifies a filter to apply when transferring a directory.
|
MultipleFileDownload |
Multiple file download of an entire virtual directory.
|
MultipleFileUpload |
Multiple file upload of an entire virtual directory.
|
ObjectMetadataProvider |
This is the callback interface which is used by TransferManager.uploadDirectory and
TransferManager.uploadFileList.
|
ObjectTaggingProvider |
This is the callback interface which is used by
TransferManager.uploadDirectory(String,
String, File, boolean, ObjectMetadataProvider, ObjectTaggingProvider) and
TransferManager.uploadFileList(String, String, File, List, ObjectMetadataProvider,
ObjectTaggingProvider) . |
Transfer |
Represents an asynchronous upload to or download from Amazon S3.
|
Upload |
Represents an asynchronous upload to Amazon S3.
|
Class | Description |
---|---|
PauseResult<T> |
The result of a pause operation.
|
PersistableDownload |
An opaque token that holds some private state and can be used to resume a
paused download operation.
|
PersistableTransfer |
Abstract base class for the information of a pausible upload or download; such
information can be used to resume the upload or download later on, and can be
serialized/deserialized for persistence purposes.
|
PersistableUpload |
An opaque token that holds some private state and can be used to resume a
paused download operation.
|
TransferManager |
High level utility for managing transfers to Amazon S3.
|
TransferManagerBuilder |
Fluent builder for
TransferManager . |
TransferManagerConfiguration |
Configuration options for how
TransferManager processes requests. |
TransferProgress |
Describes the progress of a transfer.
|
Enum | Description |
---|---|
PauseStatus | |
Transfer.TransferState |
Enumeration of the possible transfer states.
|
This package provides the TransferManager
class, which
manages a queue of asynchronous transfers. Callers can create a TransferManager instance, sharing
that same instance throughout their application, queue new uploads for TransferManager to process,
and continue working while TransferManager tracks the asynchronous upload progress.
The main benefits of using TransferManager are:
The AmazonS3TransferProgress sample included in the AWS SDK for Java demonstrates how to use TransferManager and how to track progress for uploads.
Using TransferManager to upload data to Amazon S3 is easy:
AWSCredentials myCredentials = new BasicAWSCredentials(...);
TransferManager tx = new TransferManager(myCredentials);
Upload myUpload = tx.upload(myBucket, myFile.getName(), myFile);
// You can poll your transfer's status to check its progress
if (myUpload.isDone() == false) {
System.out.println("Transfer: " + myUpload.getDescription());
System.out.println(" - State: " + myUpload.getState());
System.out.println(" - Progress: " + myUpload.getProgress().getBytesTransferred());
}
// Transfers also allow you to set a ProgressListener
to receive
// asynchronous notifications about your transfer's progress.
myUpload.addProgressListener(myProgressListener);
// Or you can block the current thread and wait for your transfer to
// to complete. If the transfer fails, this method will throw a
// SdkClientException or AmazonServiceException detailing the reason.
myUpload.waitForCompletion();
TransferManager
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.