com.amazonaws.services.s3.transfer

## インタフェース Transfer

- 既知のサブインタフェースのリスト:
    Download, MultipleFileDownload, MultipleFileUpload, Upload
  既知の実装クラスのリスト:
    AbstractTransfer, DownloadImpl, MultipleFileDownloadImpl, MultipleFileTransfer, MultipleFileUploadImpl, UploadImpl

      public interface Transfer

  Represents an asynchronous upload to or download from Amazon S3. Use this class to check a tranfer's progress, add listeners for progress events, check the state of a transfer, or wait for the transfer to complete.

  See `TransferManager` for more information about creating transfers.

  関連項目:
    `TransferManager.upload(String, String, java.io.File)`, `TransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)`

- - ### ネストされたクラスの概要

    ネストされたクラス
    修飾子とタイプ | インタフェースと説明
    --- | ---
    `static class` | `Transfer.TransferState` Enumeration of the possible transfer states.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `addProgressListener(ProgressListener listener)` Adds the specified progress listener to the list of listeners receiving updates about this transfer's progress.
    `java.lang.String` | `getDescription()` Returns a human-readable description of this transfer.
    `TransferProgress` | `getProgress()` Returns progress information about this transfer.
    `Transfer.TransferState` | `getState()` Returns the current state of this transfer.
    `boolean` | `isDone()` Returns whether or not the transfer is finished (i.e. completed successfully, failed, or was canceled).
    `void` | `removeProgressListener(ProgressListener listener)` Removes the specified progress listener from the list of progress listeners receiving updates about this transfer's progress.
    `void` | `waitForCompletion()` Waits for this transfer to complete.
    `AmazonClientException` | `waitForException()` Waits for this transfer to finish and returns any error that occurred, or returns `null` if no errors occurred.

- - ### メソッドの詳細

    - #### isDone

          boolean isDone()

      Returns whether or not the transfer is finished (i.e. completed successfully, failed, or was canceled).
      戻り値:
        Returns `true` if this transfer is finished (i.e. completed successfully, failed, or was canceled). Returns `false` if otherwise.

    - #### waitForCompletion

          void waitForCompletion()
                                 throws AmazonClientException,
                                        AmazonServiceException,
                                        java.lang.InterruptedException

      Waits for this transfer to complete. This is a blocking call; the current thread is suspended until this transfer completes.
      例外:
        `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 transfer to complete.

    - #### waitForException

          AmazonClientException waitForException()
                                                 throws java.lang.InterruptedException

      Waits for this transfer to finish and returns any error that occurred, or returns `null` if no errors occurred. This is a blocking call; the current thread will be suspended until this transfer either fails or completes successfully.
      戻り値:
        Any error that occurred while processing this transfer. Otherwise returns `null` if no errors occurred.
      例外:
        `java.lang.InterruptedException` - If this thread is interrupted while waiting for the transfer to complete.

    - #### getDescription

          java.lang.String getDescription()

      Returns a human-readable description of this transfer.
      戻り値:
        A human-readable description of this transfer.

    - #### getState

          Transfer.TransferState getState()

      Returns the current state of this transfer.
      戻り値:
        The current state of this transfer.

    - #### addProgressListener

          void addProgressListener(ProgressListener listener)

      Adds the specified progress listener to the list of listeners receiving updates about this transfer's progress.
      パラメータ:
        `listener` - The progress listener to add.

    - #### removeProgressListener

          void removeProgressListener(ProgressListener listener)

      Removes the specified progress listener from the list of progress listeners receiving updates about this transfer's progress.
      パラメータ:
        `listener` - The progress listener to remove.

    - #### getProgress

          TransferProgress getProgress()

      Returns progress information about this transfer.
      戻り値:
        The progress information about this transfer.