com.amazonaws.services.s3.transfer
Interface Upload

All Superinterfaces:
Transfer

Deprecated. These classes have been deprecated, please use the classes in the com.amazonaws.mobileconnectors namespace.

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
 void abort()
          Deprecated. Abort the current upload operation.
 PersistableUpload pause()
          Deprecated. Pause the current upload operation and returns the information that can be used to resume the upload.
 PauseResult<PersistableUpload> tryPause(boolean forceCancelTransfers)
          Deprecated. Tries to pause the current upload operation and returns the information that can be used to resume the upload.
 UploadResult waitForUploadResult()
          Deprecated. Waits for this upload to complete and returns the result of this upload.
 
Methods inherited from interface com.amazonaws.services.s3.transfer.Transfer
addProgressListener, addProgressListener, getDescription, getProgress, getState, isDone, removeProgressListener, removeProgressListener, waitForCompletion, waitForException
 

Method Detail

waitForUploadResult

UploadResult waitForUploadResult()
                                 throws AmazonClientException,
                                        AmazonServiceException,
                                        java.lang.InterruptedException
Deprecated. 
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.
java.lang.InterruptedException - If this thread is interrupted while waiting for the upload to complete.

pause

PersistableUpload pause()
                        throws PauseException
Deprecated. 
Pause the current upload operation and returns the information that can be used to resume the upload. Upload cannot be paused in the following cases. In such cases, aborts the uploads and a PauseFailure exception is thrown

Returns:
An opaque token that holds some private state and can be used to resume a paused download operation.
Throws:
PauseException - If failed to pause the operation.

tryPause

PauseResult<PersistableUpload> tryPause(boolean forceCancelTransfers)
Deprecated. 
Tries to pause the current upload operation and returns the information that can be used to resume the upload. Upload cannot be paused in the following cases. In such cases, aborts the uploads if forceCancelTransfers is set else No action is taken.

Parameters:
forceCancelTransfers - a boolean to forcefully abort the existing uploads if pause cannot be done.
Returns:
a result of pause operation.

abort

void abort()
Deprecated. 
Abort the current upload operation.



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