com.jscape.filetransfer

## Class FileTransferUploadEvent

- java.lang.Object
- - java.util.EventObject
  - - com.jscape.filetransfer.FileTransferEvent
    - - com.jscape.filetransfer.FileTransferUploadEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class FileTransferUploadEvent
      extends FileTransferEvent

  Fired when file is uploaded to server.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTransferUploadEvent(FileTransfer source, java.lang.String filename, java.lang.String path, java.lang.String localPath, long size, long time)` Creates a new event instance.
    `FileTransferUploadEvent(FileTransfer source, java.lang.String filename, java.lang.String path, java.lang.String localPath, long size, long time, java.util.Map<java.lang.String,java.lang.Object> attributes)` Creates a new event instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(FileTransferListener listener)` Accepts event via FileTransferListener.
    `java.lang.Object` | `attributeFor(java.lang.String name)`
    `java.lang.Object` | `attributeFor(java.lang.String name, java.lang.Object defaultValue)`
    `java.lang.String` | `getFilename()` Gets name of file uploaded.
    `java.lang.String` | `getLocalPath()` Returns uploaded file local path.
    `java.lang.String` | `getPath()` Gets remote path the file was uploaded to.
    `long` | `getSize()` Gets total bytes transmitted.
    `long` | `getTime()` Gets total time to transfer file measured in milliseconds.
    `java.lang.String` | `toString()`

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

      `getSource`

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

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

- - ### Constructor Detail

    - #### FileTransferUploadEvent

          public FileTransferUploadEvent(FileTransfer source,
                                         java.lang.String filename,
                                         java.lang.String path,
                                         java.lang.String localPath,
                                         long size,
                                         long time,
                                         java.util.Map<java.lang.String,java.lang.Object> attributes)

      Creates a new event instance.
      Parameters:
        `source` - the source of the event
        `filename` - the file uploaded
        `path` - the remote path the file was uploaded to
        `localPath` - the local file path
        `size` - the size of file in bytes
        `time` - the time to transfer file in milliseconds
        `attributes` - transfer-specific attributes

    - #### FileTransferUploadEvent

          public FileTransferUploadEvent(FileTransfer source,
                                         java.lang.String filename,
                                         java.lang.String path,
                                         java.lang.String localPath,
                                         long size,
                                         long time)

      Creates a new event instance.
      Parameters:
        `source` - the source of the event
        `filename` - the file uploaded
        `path` - the remote path the file was uploaded to
        `localPath` - the local file path
        `size` - the size of file in bytes
        `time` - the time to transfer file in milliseconds

  - ### Method Detail

    - #### getFilename

          public java.lang.String getFilename()

      Gets name of file uploaded.
      Returns:
        filename

    - #### getPath

          public java.lang.String getPath()

      Gets remote path the file was uploaded to.
      Returns:
        remote directory path

    - #### getLocalPath

          public java.lang.String getLocalPath()

      Returns uploaded file local path.
      Returns:
        uploaded file local path

    - #### getSize

          public long getSize()

      Gets total bytes transmitted.
      Returns:
        bytes transmitted

    - #### getTime

          public long getTime()

      Gets total time to transfer file measured in milliseconds.
      Returns:
        total time

    - #### attributeFor

          public java.lang.Object attributeFor(java.lang.String name)

    - #### attributeFor

          public java.lang.Object attributeFor(java.lang.String name,
                                               java.lang.Object defaultValue)

    - #### accept

          public void accept(FileTransferListener listener)

      Accepts event via FileTransferListener.
      Specified by:
        `accept` in class `FileTransferEvent`
      Parameters:
        `listener` - the listener which receives event

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.util.EventObject`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved