View Javadoc

1   // ConnectionEventSource.java -
2   // $Id: ConnectionEventSource.java,v 1.3 2006/02/20 04:52:11 sjardine Exp $
3   //
4   // Copyright 2000, Joe Phillips <jaiger@innovationsw.com>
5   // Copyright 2001, 2002 Innovation Software Group, LLC - http://www.innovationsw.com
6   //
7   // This library is free software; you can redistribute it and/or
8   // modify it under the terms of the GNU Library General Public
9   // License as published by the Free Software Foundation; either
10  // version 2 of the License, or (at your option) any later version.
11  //
12  // This library is distributed in the hope that it will be useful,
13  // but WITHOUT ANY WARRANTY; without even the implied warranty of
14  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  // Library General Public License for more details.
16  //
17  // You should have received a copy of the GNU Library General Public
18  // License along with this library; if not, write to the Free
19  // Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  //
21  package gnu.inet.ftp;
22  
23  import java.util.Vector;
24  
25  public abstract interface ConnectionEventSource {
26  
27      /***
28       * register a connection listener with the event source. Each
29       * ConnectionListener registered with the event source will be notified when
30       * a connection event occurs.
31       * 
32       * @param listener
33       *                the ConnectionListener to register with the event source
34       */
35      public abstract void addConnectionListener(ConnectionListener listener);
36  
37      /***
38       * register a set of connection listenesr with the event source. Each
39       * ConnectionListener registered with the event source will be notified when
40       * a connection event occurs.
41       * 
42       * @param listeners
43       *                the ConnectionListeners to register with the event source
44       */
45      public abstract void addConnectionListeners(Vector listeners);
46  
47      /***
48       * deregister a connection listener with the event source. Once a listener
49       * has been de-registered, it should not receive any more connection events.
50       * 
51       * @param listener
52       *                the ConnectionListener to de-register
53       */
54      public abstract void removeConnectionListener(ConnectionListener listener);
55  
56  }