com.amazonaws.services.s3.transfer.internal

## クラス AbstractTransfer

- java.lang.Object
- - com.amazonaws.services.s3.transfer.internal.AbstractTransfer

- すべての実装されたインタフェース:
    Transfer
  直系の既知のサブクラス:
    DownloadImpl, MultipleFileTransfer, UploadImpl

      public abstract class AbstractTransfer
      extends java.lang.Object
      implements Transfer

  Abstract transfer implementation.

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

    - ### インタフェースから継承されたネストされたクラス/インタフェース com.amazonaws.services.s3.transfer.Transfer

      `Transfer.TransferState`

  - ### フィールドの概要

    フィールド
    修飾子とタイプ | フィールドと説明
    --- | ---
    `protected TransferMonitor` | `monitor`
    `protected ProgressListenerChain` | `progressListenerChain` Hook for adding/removing more progress listeners.
    `protected java.util.Collection<TransferStateChangeListener>` | `stateChangeListeners` Collection of listeners to be notified for changes to the state of this transfer via setState()

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `addProgressListener(ProgressListener listener)` Adds the specified progress listener to the list of listeners receiving updates about this transfer's progress.
    `void` | `addStateChangeListener(TransferStateChangeListener listener)` Adds the given state change listener to the collection of listeners.
    `java.lang.String` | `getDescription()` Returns a human-readable description of this transfer.
    `TransferMonitor` | `getMonitor()`
    `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` | `removeStateChangeListener(TransferStateChangeListener listener)` Removes the given state change listener from the collection of listeners.
    `protected void` | `rethrowExecutionException(java.util.concurrent.ExecutionException e)` Examines the cause of the specified ExecutionException and either rethrows it directly (if it's a type of AmazonClientException) or wraps it in an AmazonClientException and rethrows it.
    `void` | `setMonitor(TransferMonitor monitor)` Sets the monitor used to poll for transfer completion.
    `void` | `setState(Transfer.TransferState state)` Sets the current state of this transfer.
    `protected AmazonClientException` | `unwrapExecutionException(java.util.concurrent.ExecutionException e)` Unwraps the root exception that caused the specified ExecutionException and returns it.
    `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.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### フィールドの詳細

    - #### monitor

          protected TransferMonitor monitor

    - #### progressListenerChain

          protected ProgressListenerChain progressListenerChain

      Hook for adding/removing more progress listeners.

    - #### stateChangeListeners

          protected final java.util.Collection<TransferStateChangeListener> stateChangeListeners

      Collection of listeners to be notified for changes to the state of this transfer via setState()

  - ### メソッドの詳細

    - #### isDone

          public boolean isDone()

      Returns whether or not the transfer is finished (i.e. completed successfully, failed, or was canceled).
      定義:
        `isDone` インタフェース内 `Transfer`
      戻り値:
        Returns `true` if this transfer is finished (i.e. completed successfully, failed, or was canceled). Returns `false` if otherwise.

    - #### waitForCompletion

          public 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.
      定義:
        `waitForCompletion` インタフェース内 `Transfer`
      例外:
        `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

          public 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.
      定義:
        `waitForException` インタフェース内 `Transfer`
      戻り値:
        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

          public java.lang.String getDescription()

      Returns a human-readable description of this transfer.
      定義:
        `getDescription` インタフェース内 `Transfer`
      戻り値:
        A human-readable description of this transfer.

    - #### getState

          public Transfer.TransferState getState()

      Returns the current state of this transfer.
      定義:
        `getState` インタフェース内 `Transfer`
      戻り値:
        The current state of this transfer.

    - #### setState

          public void setState(Transfer.TransferState state)

      Sets the current state of this transfer.

    - #### addProgressListener

          public void addProgressListener(ProgressListener listener)

      Adds the specified progress listener to the list of listeners receiving updates about this transfer's progress.
      定義:
        `addProgressListener` インタフェース内 `Transfer`
      パラメータ:
        `listener` - The progress listener to add.

    - #### removeProgressListener

          public void removeProgressListener(ProgressListener listener)

      Removes the specified progress listener from the list of progress listeners receiving updates about this transfer's progress.
      定義:
        `removeProgressListener` インタフェース内 `Transfer`
      パラメータ:
        `listener` - The progress listener to remove.

    - #### addStateChangeListener

          public void addStateChangeListener(TransferStateChangeListener listener)

      Adds the given state change listener to the collection of listeners.

    - #### removeStateChangeListener

          public void removeStateChangeListener(TransferStateChangeListener listener)

      Removes the given state change listener from the collection of listeners.

    - #### getProgress

          public TransferProgress getProgress()

      Returns progress information about this transfer.
      定義:
        `getProgress` インタフェース内 `Transfer`
      戻り値:
        The progress information about this transfer.

    - #### setMonitor

          public void setMonitor(TransferMonitor monitor)

      Sets the monitor used to poll for transfer completion.

    - #### getMonitor

          public TransferMonitor getMonitor()

    - #### rethrowExecutionException

          protected void rethrowExecutionException(java.util.concurrent.ExecutionException e)

      Examines the cause of the specified ExecutionException and either rethrows it directly (if it's a type of AmazonClientException) or wraps it in an AmazonClientException and rethrows it.
      パラメータ:
        `e` - The execution exception to examine.

    - #### unwrapExecutionException

          protected AmazonClientException unwrapExecutionException(java.util.concurrent.ExecutionException e)

      Unwraps the root exception that caused the specified ExecutionException and returns it. If it was not an instance of AmazonClientException, it is wrapped as an AmazonClientException.
      パラメータ:
        `e` - The ExecutionException to unwrap.
      戻り値:
        The root exception that caused the specified ExecutionException.