code: public UploadResult waitForUploadResult()
              throws AmazonClientException, AmazonServiceException, InterruptedException {
          try {
              UploadResult result = null;
              while (!monitor.isDone() || result == null) {
                  Future<?> f = monitor.getFuture();
                  result = (UploadResult)f.get();
              }
              return result;
          } catch (ExecutionException e) {
              rethrowExecutionException(e);
              return null;
          }
      }
docs: Waits for this upload to complete and returns the result of this upload.
  This is a blocking call. Be prepared to handle errors when calling this
  method. Any errors that occurred during the asynchronous transfer will be
  re-thrown through this method.
  
  @return The result of this transfer.
  
  @throws AmazonClientException
  If any errors were encountered in the client while making the
  request or handling the response.
  @throws AmazonServiceException
  If any errors occurred in Amazon S3 while processing the
  request.
  @throws InterruptedException
  If this thread is interrupted while waiting for the upload to
  complete.