while (requestFactory.hasMoreRequests()) {
if (threadPool.isShutdown()) throw new CancellationException("TransferManager has been shutdown");
partETags.add(s3.uploadPart(requestFactory.getNextUploadPartRequest()).getPartETag());
}
CompleteMultipartUploadResult completeMultipartUploadResult = s3
.completeMultipartUpload(new CompleteMultipartUploadRequest(putObjectRequest.getBucketName(),
putObjectRequest.getKey(), multipartUploadId, partETags));
fireProgressEvent(ProgressEvent.COMPLETED_EVENT_CODE);
UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(completeMultipartUploadResult.getBucketName());
uploadResult.setKey(completeMultipartUploadResult.getKey());
uploadResult.setETag(completeMultipartUploadResult.getETag());
uploadResult.setVersionId(completeMultipartUploadResult.getVersionId());
return uploadResult;
}