Secure FTP Factory

com.jscape.filetransfer
Class FileTransferProgressEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jscape.filetransfer.FileTransferEvent
          extended by com.jscape.filetransfer.FileTransferProgressEvent
All Implemented Interfaces:
java.io.Serializable

public class FileTransferProgressEvent
extends FileTransferEvent

Fired on significant progress in upload and download operations in FileTransfer derived classes.

See Also:
Serialized Form

Field Summary
static int DOWNLOAD
          Indicates DOWNLOAD process.
static int UPLOAD
          Indicates UPLOAD process.
 
Constructor Summary
FileTransferProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long totalBytes)
          Constructs new FileTransferProgressEvent.
FileTransferProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long readBytes, long totalBytes)
           
 
Method Summary
 void accept(FileTransferListener listener)
          Accepts event via FileTransferListener.
 java.lang.String getAbsolutePath()
          Gets absolute path of file transferred.
 long getBytes()
          Gets the number of bytes transferred so far.
 java.lang.String getFilename()
          Gets name of file transferred.
 int getMode()
          Gets mode of transfer, upload or download.
 long getReadBytes()
           
 long getTotalBytes()
          Gets the number of bytes for the file being transferred.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, 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

FileTransferProgressEvent

public FileTransferProgressEvent(java.lang.Object source,
                                 java.lang.String filename,
                                 java.lang.String path,
                                 int mode,
                                 long bytes,
                                 long totalBytes)
Constructs new FileTransferProgressEvent.

Parameters:
source - the source of this event
filename - the name of file being transferred
path - the file path of file transferred
mode - the direction of transfer
bytes - the number of bytes transferred
totalBytes - the number of bytes for the file being transferred

FileTransferProgressEvent

public FileTransferProgressEvent(java.lang.Object source,
                                 java.lang.String filename,
                                 java.lang.String path,
                                 int mode,
                                 long bytes,
                                 long readBytes,
                                 long totalBytes)
Parameters:
source - source
filename - filename
path - path
mode - mode
bytes - bytes
readBytes - readBytes
totalBytes - totalBytes
Method Detail

getReadBytes

public long getReadBytes()
Returns:
readBytes

getMode

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

Returns:
mode
See Also:
UPLOAD, DOWNLOAD

getFilename

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

Returns:
filename

getAbsolutePath

public java.lang.String getAbsolutePath()
Gets absolute path of file transferred.

Returns:
the absolute path

getBytes

public long getBytes()
Gets the number of bytes transferred so far.

Returns:
bytes

getTotalBytes

public long getTotalBytes()
Gets the number of bytes for the file being transferred.

Returns:
bytes

accept

public void accept(FileTransferListener listener)
Accepts event via FileTransferListener.

Specified by:
accept in class FileTransferEvent
Parameters:
listener - the listener which receives event

Secure FTP Factory

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