Secure FTP Factory

com.jscape.inet.ftp
Class FtpAdapter

java.lang.Object
  extended by com.jscape.inet.ftp.FtpAdapter
All Implemented Interfaces:
FtpListener, java.util.EventListener

public class FtpAdapter
extends java.lang.Object
implements FtpListener

Implements methods for capturing events sourced from Ftp class. This class is intended to provide vertical compatibility with FtpListener interface. Typicaly your application will use this class instead of FtpListener interface to capture the following events :
FtpConnectedEvent
FtpDisconnectedEvent
FtpUploadEvent
FtpDownloadEvent
FtpCommandEvent
FtpResponseEvent
FtpListingEvent
FtpProgressEvent
FtpConnectionLostEvent


Constructor Summary
FtpAdapter()
           
 
Method Summary
 void changeDir(FtpChangeDirEvent event)
          Invoked when the remote directory path is changed on the server.
 void commandSent(FtpCommandEvent event)
          Invoked when a command is sent to FTP server.
 void connected(FtpConnectedEvent event)
          Invoked when connection to FTP server is established.
 void connectionLost(FtpConnectionLostEvent event)
          Invoked when connection to FTP server is unexpectedly closed.
 void createDir(FtpCreateDirEvent event)
          Invoked when a directory is created.
 void deleteDir(FtpDeleteDirEvent event)
          Invoked when directory is deleted.
 void deleteFile(FtpDeleteFileEvent event)
          Invoked when a file is deleted.
 void disconnected(FtpDisconnectedEvent event)
          Invoked when connection to FTP server is released.
 void download(FtpDownloadEvent event)
          Invoked when file is downloaded from FTP server.
 void listing(FtpListingEvent event)
          Invoked when directory listing is retrieved from FTP server.
 void progress(FtpProgressEvent event)
          Invoked to mark progress of a download or upload operation.
 void renameFile(FtpRenameFileEvent event)
          Invoked when a file is renamed.
 void responseReceived(FtpResponseEvent event)
          Invoked when a response is received from FTP server.
 void upload(FtpUploadEvent event)
          Invoked when file is uploaded to FTP server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpAdapter

public FtpAdapter()
Method Detail

connected

public void connected(FtpConnectedEvent event)
Invoked when connection to FTP server is established.

Specified by:
connected in interface FtpListener
Parameters:
event - a FtpConnectedEvent
See Also:
FtpConnectedEvent

disconnected

public void disconnected(FtpDisconnectedEvent event)
Invoked when connection to FTP server is released.

Specified by:
disconnected in interface FtpListener
Parameters:
event - a FtpDisconnectedEvent
See Also:
FtpDisconnectedEvent

upload

public void upload(FtpUploadEvent event)
Invoked when file is uploaded to FTP server.

Specified by:
upload in interface FtpListener
Parameters:
event - a FtpUploadEvent
See Also:
FtpUploadEvent

download

public void download(FtpDownloadEvent event)
Invoked when file is downloaded from FTP server.

Specified by:
download in interface FtpListener
Parameters:
event - a FtpDownloadEvent
See Also:
FtpDownloadEvent

progress

public void progress(FtpProgressEvent event)
Invoked to mark progress of a download or upload operation.

Specified by:
progress in interface FtpListener
Parameters:
event - a FtpProgressEvent
See Also:
FtpProgressEvent

listing

public void listing(FtpListingEvent event)
Invoked when directory listing is retrieved from FTP server.

Specified by:
listing in interface FtpListener
Parameters:
event - a FtpListingEvent
See Also:
FtpListingEvent

commandSent

public void commandSent(FtpCommandEvent event)
Invoked when a command is sent to FTP server.

Specified by:
commandSent in interface FtpListener
Parameters:
event - a FtpCommandEvent
See Also:
FtpCommandEvent

responseReceived

public void responseReceived(FtpResponseEvent event)
Invoked when a response is received from FTP server.

Specified by:
responseReceived in interface FtpListener
Parameters:
event - a FtpResponseEvent
See Also:
FtpResponseEvent

connectionLost

public void connectionLost(FtpConnectionLostEvent event)
Invoked when connection to FTP server is unexpectedly closed.

Specified by:
connectionLost in interface FtpListener
Parameters:
event - a FtpConnectionLostEvent
See Also:
FtpConnectionLostEvent

deleteDir

public void deleteDir(FtpDeleteDirEvent event)
Invoked when directory is deleted.

Specified by:
deleteDir in interface FtpListener
Parameters:
event - a FtpDeleteDirEvent
See Also:
FtpDeleteDirEvent

deleteFile

public void deleteFile(FtpDeleteFileEvent event)
Invoked when a file is deleted.

Specified by:
deleteFile in interface FtpListener
Parameters:
event - a FtpDeleteFileEvent
See Also:
FtpDeleteFileEvent

renameFile

public void renameFile(FtpRenameFileEvent event)
Invoked when a file is renamed.

Specified by:
renameFile in interface FtpListener
Parameters:
event - a FtpRenameFileEvent
See Also:
FtpRenameFileEvent

createDir

public void createDir(FtpCreateDirEvent event)
Invoked when a directory is created.

Specified by:
createDir in interface FtpListener
Parameters:
event - a FtpCreateDirEvent
See Also:
FtpCreateDirEvent

changeDir

public void changeDir(FtpChangeDirEvent event)
Invoked when the remote directory path is changed on the server.

Specified by:
changeDir in interface FtpListener
Parameters:
event - a FtpChangeDirEvent
See Also:
FtpChangeDirEvent

Secure FTP Factory

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