public CopyResult waitForCopyResult ( ) throws AmazonClientException , AmazonServiceException , InterruptedException { try { CopyResult result = null ; while ( ! monitor . isDone ( ) || result == null ) { Future < ? > f = monitor . getFuture ( ) ; result = ( CopyResult ) f . get ( ) ; } return result ; } catch ( ExecutionException e ) { rethrowExecutionException ( e ) ; return null ; } }
Waits for this copy operation to complete and returns the result of the operation . Be prepared to handle errors when calling this method . Any errors that occurred during the asynchronous transfer will be re - thrown through this method .