com.jscape.inet.sftp.events

## Class SftpProgressEvent

- java.lang.Object
- - com.jscape.inet.sftp.events.SftpEvent
  - - com.jscape.inet.sftp.events.SftpProgressEvent

-     public class SftpProgressEvent
      extends SftpEvent

  This event is fired on significant progress in upload and download operations in Sftp class.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DOWNLOAD` Indicates DOWNLOAD process
    `static int` | `UPLOAD` Indicates UPLOAD process

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SftpProgressEvent(Sftp source, java.lang.String fileName, java.lang.String path, java.lang.String localFilePath, int mode, long totalBytes, long transferredBytes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(SftpListener listener)` The "backwards dispatching" support.
    `long` | `getBytes()` Gets the number of bytes transferred so far.
    `java.lang.String` | `getFilename()` Gets the name of file transferred.
    `java.lang.String` | `getLocalFilePath()` Get local file path,
    `int` | `getMode()` Gets mode of transfer, upload or download.
    `java.lang.String` | `getPath()` Get path.
    `long` | `getTotalBytes()` Gets the total number of bytes for the file being transferred.

    - ### Methods inherited from class com.jscape.inet.sftp.events.SftpEvent

      `getSource`

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

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

- - ### Field Detail

    - #### UPLOAD

          public static final int UPLOAD

      Indicates UPLOAD process
      See Also:
        Constant Field Values

    - #### DOWNLOAD

          public static final int DOWNLOAD

      Indicates DOWNLOAD process
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SftpProgressEvent

          public SftpProgressEvent(Sftp source,
                                   java.lang.String fileName,
                                   java.lang.String path,
                                   java.lang.String localFilePath,
                                   int mode,
                                   long totalBytes,
                                   long transferredBytes)

  - ### Method Detail

    - #### getFilename

          public java.lang.String getFilename()

      Gets the name of file transferred.
      Returns:
        the name of file transferred

    - #### getPath

          public java.lang.String getPath()

      Get path.
      Returns:
        path

    - #### getLocalFilePath

          public java.lang.String getLocalFilePath()

      Get local file path,
      Returns:
        path.

    - #### getMode

          public int getMode()

      Gets mode of transfer, upload or download.
      Returns:
        transfer mode
      See Also:
        `UPLOAD`, `DOWNLOAD`

    - #### getBytes

          public long getBytes()

      Gets the number of bytes transferred so far.
      Returns:
        the number of bytes transferred

    - #### getTotalBytes

          public long getTotalBytes()

      Gets the total number of bytes for the file being transferred.
      Returns:
        the total number of bytes for the file

    - #### accept

          public void accept(SftpListener listener)

      The "backwards dispatching" support.
      Specified by:
        `accept` in class `SftpEvent`
      Parameters:
        `listener` - the event listener

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