Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/finj/FTPClientObserver.java


1   package org.finj;
2   
3   import java.util.EventListener;
4   import org.finj.FTPReply;
5   
6   /**
7    * Instances of this observer receive notifications of the progress 
8    * of the work of an <CODE>FTPClient</CODE> to which they have to 
9    * be registered.
10   * 
11   * @author Javier Iglesias -- jiglesias@users.sourceforge.net 
12   * @version $Id$
13   */
14  public interface FTPClientObserver extends EventListener {
15  
16      /**
17       * Method called by an <CODE>FTPClient</CODE> when 
18       * <CODE>this</CODE> is added or removed as an observer.
19       * 
20       * [API DISCUSSION : Do you think this is useless ?]
21       *
22       * @param isIt   <CODE>true</CODE> when <CODE>this</CODE> is
23       *               a new observer of a <CODE>FTPClient</CODE>, 
24       *               <CODE>false</CODE> when removed.
25       * @since v1.0
26       */
27      public void isObserving ( boolean isIt );
28  
29      /**
30       * Method called whenever a new connection is opened with a 
31       * server.
32       *
33       * @since v1.0
34       */
35      public void controlConnectionOpened ( );
36  
37      /**
38       * Method called whenever a new connection is closed with a 
39       * server.
40       *
41       * @since v1.0
42       */
43      public void controlConnectionClosed ( );
44  
45      /**
46       * Method called when a command has been sent to the FTP server.
47       *
48       * @since v1.0
49       */
50      public void commandSent ( String command );
51  
52      /**
53       * Method called when a reply is received from the FTP server.
54       *
55       * @since v1.0
56       */
57      public void replyReceived ( FTPReply reply );
58  
59  /**
60   * Method called whenever data is received from the FTP server.
61   *
62   * This is a convenient way to monitor the work of the <CODE>FTPClient</CODE>.
63   *
64   * @param bytes number of bytes of data received from the server.
65   * @since v1.0
66   */
67      public void dataReceived ( int bytes );
68  /**
69   * Method called whenever data is sent to the FTP server.
70   *
71   * This is a convenient way to monitor the work of the <CODE>FTPClient</CODE>.
72   *
73   * @param bytes number of bytes of data sent to the server.
74   * @since v1.0
75   */
76      public void dataSent ( int bytes );
77  
78  }
79  
80