com.ansys.ingress.client.api.transfers

## Class TransferEvent

- java.lang.Object
- - java.util.EventObject
  - - com.ansys.ingress.client.api.transfers.TransferEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class TransferEvent
      extends java.util.EventObject

  TransferEvent is used to pass information to a `TransferEventListener` about the current state of a file transfer (upload or download).
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `TransferEvent.Error` Error describes an error that occured during the transfer.
    `class` | `TransferEvent.FailedItem` FailedItem contains information about an item that was not successfully transferred.
    `static class` | `TransferEvent.Reason` Reason is the reason for the event.

  - ### Field Summary

    - ### Fields inherited from class java.util.EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransferEvent(java.lang.Object source)` Creates a new instance of TransferEvent.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCacheId()`
    `java.lang.String` | `getDownloadedFile()` Returns the value of the downloadedFile.
    `java.lang.String` | `getDownloadedFilePath()` Returns the value of the downloadedFilePath.
    `TransferEvent.Error` | `getError()`
    `java.lang.String` | `getLastModified()` Returns the value of the lastModified.
    `int` | `getProgress()`
    `TransferEvent.Reason` | `getReason()`
    `void` | `setCacheId(java.lang.String cacheId)` Sets the cache job ID used to get cache status.
    `void` | `setDownloadedFile(java.lang.String downloadedFile)` Sets the file that was downloaded
    `void` | `setDownloadedFilePath(java.lang.String downloadedFilePath)` Sets the path of a downloaded file.
    `void` | `setError(TransferEvent.Error error)` Sets the error that caused the transfer to fail.
    `void` | `setLastModified(java.lang.String lastModified)` Sets the value of the lastModified.
    `void` | `setProgress(int progress)` Sets the current progress of the transfer as an integer between 0 up to and including 100.
    `void` | `setReason(TransferEvent.Reason reason)` Sets the reason for the event.

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### TransferEvent

          public TransferEvent(java.lang.Object source)

      Creates a new instance of TransferEvent.
      Parameters:
        `source` - the source of the event

  - ### Method Detail

    - #### getProgress

          public int getProgress()

      Returns:
        Returns the progress of a transfer.

    - #### getError

          public TransferEvent.Error getError()

      Returns:
        Returns the error that caused the transfer to fail.

    - #### getReason

          public TransferEvent.Reason getReason()

      Returns:
        Returns the reason for the transfer.

    - #### getDownloadedFile

          public java.lang.String getDownloadedFile()

      Returns the value of the downloadedFile.
      Returns:
        Returns the value.

    - #### getDownloadedFilePath

          public java.lang.String getDownloadedFilePath()

      Returns the value of the downloadedFilePath.
      Returns:
        Returns the value.

    - #### getLastModified

          public java.lang.String getLastModified()

      Returns the value of the lastModified.
      Returns:
        Returns the value.

    - #### setLastModified

          public void setLastModified(java.lang.String lastModified)

      Sets the value of the lastModified.
      Parameters:
        `lastModified` - the value to set

    - #### setProgress

          public void setProgress(int progress)

      Sets the current progress of the transfer as an integer between 0 up to and including 100.
      Parameters:
        `progress` - the progress value

    - #### setError

          public void setError(TransferEvent.Error error)

      Sets the error that caused the transfer to fail.
      Parameters:
        `error` - the error

    - #### setReason

          public void setReason(TransferEvent.Reason reason)

      Sets the reason for the event.
      Parameters:
        `reason` - the reason

    - #### getCacheId

          public java.lang.String getCacheId()

      Returns:
        Returns the cache job ID or null if not using cache.

    - #### setCacheId

          public void setCacheId(java.lang.String cacheId)

      Sets the cache job ID used to get cache status.
      Parameters:
        `cacheId` - the cache job ID

    - #### setDownloadedFile

          public void setDownloadedFile(java.lang.String downloadedFile)

      Sets the file that was downloaded
      Parameters:
        `downloadedFile` - the value to set

    - #### setDownloadedFilePath

          public void setDownloadedFilePath(java.lang.String downloadedFilePath)

      Sets the path of a downloaded file.
      Parameters:
        `downloadedFilePath` - the value to set