com.jscape.inet.ftp

## Interface FtpListener

- All Superinterfaces:
    java.util.EventListener
  All Known Subinterfaces:
    FtpErrorListener
  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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

          void connected(FtpConnectedEvent event)

      Invoked when connection to FTP server is established.
      Parameters:
        `event` - a `FtpConnectedEvent`
      See Also:
        `FtpConnectedEvent`

    - #### disconnected

          void disconnected(FtpDisconnectedEvent event)

      Invoked when connection to FTP server is released.
      Parameters:
        `event` - a `FtpDisconnectedEvent`
      See Also:
        `FtpDisconnectedEvent`

    - #### deleteDir

          void deleteDir(FtpDeleteDirEvent event)

      Invoked when directory is deleted.
      Parameters:
        `event` - a `FtpDeleteDirEvent`
      See Also:
        `FtpDeleteDirEvent`

    - #### deleteFile

          void deleteFile(FtpDeleteFileEvent event)

      Invoked when a file is deleted.
      Parameters:
        `event` - a `FtpDeleteFileEvent`
      See Also:
        `FtpDeleteFileEvent`

    - #### renameFile

          void renameFile(FtpRenameFileEvent event)

      Invoked when a file is renamed.
      Parameters:
        `event` - a `FtpRenameFileEvent`
      See Also:
        `FtpRenameFileEvent`

    - #### createDir

          void createDir(FtpCreateDirEvent event)

      Invoked when a directory is created.
      Parameters:
        `event` - a `FtpCreateDirEvent`
      See Also:
        `FtpCreateDirEvent`

    - #### changeDir

          void changeDir(FtpChangeDirEvent event)

      Invoked when the remote directory path is changed on the server.
      Parameters:
        `event` - a `FtpChangeDirEvent`
      See Also:
        `FtpChangeDirEvent`

    - #### upload

          void upload(FtpUploadEvent event)

      Invoked when file is uploaded to FTP server.
      Parameters:
        `event` - a `FtpUploadEvent`
      See Also:
        `FtpUploadEvent`

    - #### download

          void download(FtpDownloadEvent event)

      Invoked when file is downloaded from FTP server.
      Parameters:
        `event` - a `FtpDownloadEvent`
      See Also:
        `FtpDownloadEvent`

    - #### progress

          void progress(FtpProgressEvent event)

      Invoked to mark progress of a FTP download or upload operation.
      Parameters:
        `event` - a `FtpProgressEvent`
      See Also:
        `FtpProgressEvent`

    - #### listing

          void listing(FtpListingEvent event)

      Invoked when directory listing is retrieved from FTP server.
      Parameters:
        `event` - a `FtpListingEvent`
      See Also:
        `FtpListingEvent`

    - #### commandSent

          void commandSent(FtpCommandEvent event)

      Invoked when a command is sent to FTP server.
      Parameters:
        `event` - a `FtpCommandEvent`
      See Also:
        `FtpCommandEvent`

    - #### responseReceived

          void responseReceived(FtpResponseEvent event)

      Invoked when a response is received from FTP server.
      Parameters:
        `event` - a `FtpResponseEvent`
      See Also:
        `FtpResponseEvent`

    - #### connectionLost

          void connectionLost(FtpConnectionLostEvent event)

      Invoked when connection to FTP server is unexpectedly closed.
      Parameters:
        `event` - a `FtpConnectionLostEvent`
      See Also:
        `FtpConnectionLostEvent`

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