com.amazonaws.services.s3.transfer
Interface Upload

All Superinterfaces:
Transfer

public interface Upload
extends Transfer

Represents an asynchronous upload to Amazon S3.

See TransferManager for more information about creating transfers.

See Also:
TransferManager.upload(String, String, java.io.File), TransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.amazonaws.services.s3.transfer.Transfer
Transfer.TransferState
 
Method Summary
 UploadResult waitForUploadResult()
          Waits for this upload to complete and returns the result of this upload.
 
Methods inherited from interface com.amazonaws.services.s3.transfer.Transfer
addProgressListener, getDescription, getProgress, getState, isDone, removeProgressListener, waitForCompletion, waitForException
 

Method Detail

waitForUploadResult

UploadResult waitForUploadResult()
                                 throws AmazonClientException,
                                        AmazonServiceException,
                                        InterruptedException
Waits for this upload to complete and returns the result of this upload. Be prepared to handle errors when calling this method. Any errors that occurred during the asynchronous transfer will be re-thrown through this method.

Returns:
The result of this transfer.
Throws:
AmazonClientException - If any errors were encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.
InterruptedException - If this thread is interrupted while waiting for the upload to complete.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.