Secure iNet Factory

com.jscape.inet.sftp.events
Class SftpProgressEvent

java.lang.Object
  extended by com.jscape.inet.sftp.events.SftpEvent
      extended by com.jscape.inet.sftp.events.SftpProgressEvent

public final class SftpProgressEvent
extends SftpEvent

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


Field Summary
static int DOWNLOAD
          Indicates DOWNLOAD process
static int UPLOAD
          Indicates UPLOAD process
 
Constructor Summary
SftpProgressEvent(Sftp source, java.lang.String fileName, int mode, long transferredBytes, long totalBytes)
          Creates a new event instance.
SftpProgressEvent(Sftp source, java.lang.String fileName, int mode, long transferredBytes, long readBytes, long totalBytes)
          Creates a new event instance.
SftpProgressEvent(Sftp source, java.lang.String fileName, java.lang.String path, int mode, long transferredBytes, long readBytes, long totalBytes)
           
SftpProgressEvent(Sftp source, java.lang.String fileName, java.lang.String path, java.lang.String localFilePath, int mode, long transferredBytes, long readBytes, long totalBytes)
          Constructor.
 
Method Summary
 void acceptListener(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 getReadBytes()
          Get read bytes
 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,
                         int mode,
                         long transferredBytes,
                         long totalBytes)
Creates a new event instance.

Parameters:
source - the event source
fileName - the file name
mode - transfer mode - UPLOAD or DOWNLOAD
transferredBytes - number of transferred bytes
totalBytes - total bytes to transfer

SftpProgressEvent

public SftpProgressEvent(Sftp source,
                         java.lang.String fileName,
                         int mode,
                         long transferredBytes,
                         long readBytes,
                         long totalBytes)
Creates a new event instance.

Parameters:
source - the event source
fileName - the file name
mode - transfer mode - UPLOAD or DOWNLOAD
transferredBytes - number of transferred bytes
readBytes - number of bytes transferred at one time
totalBytes - total bytes to transfer

SftpProgressEvent

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

SftpProgressEvent

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

Parameters:
source -
fileName -
path -
localFilePath -
mode -
transferredBytes -
readBytes -
totalBytes -
Method Detail

getLocalFilePath

public java.lang.String getLocalFilePath()
Get local file path,

Returns:
path.

getPath

public java.lang.String getPath()
Get path.

Returns:
path

getReadBytes

public long getReadBytes()
Get read bytes

Returns:
bytes

getFilename

public java.lang.String getFilename()
Gets the name of file transferred.

Returns:
the name of file transferred

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

getMode

public int getMode()
Gets mode of transfer, upload or download.

Returns:
transfer mode
See Also:
UPLOAD, DOWNLOAD

acceptListener

public void acceptListener(SftpListener listener)
The "backwards dispatching" support.

Specified by:
acceptListener in class SftpEvent
Parameters:
listener - the event listener

Secure iNet Factory

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