Secure iNet Factory

com.jscape.inet.ftp
Interface FtpListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
FtpAdapter

public interface FtpListener
extends java.util.EventListener

Implements methods for capturing events sourced from Ftp class.

Typicaly your application will implement this interface to capture the following events :
FtpConnectedEvent
FtpDisconnectedEvent
FtpUploadEvent
FtpDownloadEvent
FtpCommandEvent
FtpRespon seEvent
FtpListingEvent
FtpProgressEvent
FtpConnectionLostEvent
FtpDeleteDirEvent
FtpDeleteFileEvent
FtpRenameFileEvent
FtpCreateDirEvent
FtpChangeDirEvent

In addition to implementing this interface your application should register itself as an EventListener which may look somewhat like this:

 public class Application ... implements FtpListener
 {
  ...
  public ... initMethod(...)
  {
    Ftp ftp = new Ftp();
    ftp.addListener(this);
  } j
  ...
 }
 


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 FTP 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.
 

Method Detail

connected

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

Parameters:
event - a FtpConnectedEvent
See Also:
FtpConnectedEvent

disconnected

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

Parameters:
event - a FtpDisconnectedEvent
See Also:
FtpDisconnectedEvent

deleteDir

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

Parameters:
event - a FtpDeleteDirEvent
See Also:
FtpDeleteDirEvent

deleteFile

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

Parameters:
event - a FtpDeleteFileEvent
See Also:
FtpDeleteFileEvent

renameFile

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

Parameters:
event - a FtpRenameFileEvent
See Also:
FtpRenameFileEvent

createDir

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

Parameters:
event - a FtpCreateDirEvent
See Also:
FtpCreateDirEvent

changeDir

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

Parameters:
event - a FtpChangeDirEvent
See Also:
FtpChangeDirEvent

upload

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

Parameters:
event - a FtpUploadEvent
See Also:
FtpUploadEvent

download

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

Parameters:
event - a FtpDownloadEvent
See Also:
FtpDownloadEvent

progress

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

Parameters:
event - a FtpProgressEvent
See Also:
FtpProgressEvent

listing

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

Parameters:
event - a FtpListingEvent
See Also:
FtpListingEvent

commandSent

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

Parameters:
event - a FtpCommandEvent
See Also:
FtpCommandEvent

responseReceived

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

Parameters:
event - a FtpResponseEvent
See Also:
FtpResponseEvent

connectionLost

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

Parameters:
event - a FtpConnectionLostEvent
See Also:
FtpConnectionLostEvent

Secure iNet Factory

Copyright JSCAPE 1999-2008 All Rights Reserved