1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.net;
17 import java.util.EventListener;
18
19 /***
20 * There exists a large class of IETF protocols that work by sending an
21 * ASCII text command and arguments to a server, and then receiving an
22 * ASCII text reply. For debugging and other purposes, it is extremely
23 * useful to log or keep track of the contents of the protocol messages.
24 * The ProtocolCommandListener interface coupled with the
25 * {@link ProtocolCommandEvent} class facilitate this process.
26 * <p>
27 * To receive ProtocolCommandEvents, you merely implement the
28 * ProtocolCommandListener interface and register the class as a listener
29 * with a ProtocolCommandEvent source such as
30 * {@link org.apache.commons.net.ftp.FTPClient}.
31 * <p>
32 * <p>
33 * @see ProtocolCommandEvent
34 * @see ProtocolCommandSupport
35 * @author Daniel F. Savarese
36 ***/
37
38 public interface ProtocolCommandListener extends EventListener
39 {
40
41 /***
42 * This method is invoked by a ProtocolCommandEvent source after
43 * sending a protocol command to a server.
44 * <p>
45 * @param event The ProtocolCommandEvent fired.
46 ***/
47 public void protocolCommandSent(ProtocolCommandEvent event);
48
49 /***
50 * This method is invoked by a ProtocolCommandEvent source after
51 * receiving a reply from a server.
52 * <p>
53 * @param event The ProtocolCommandEvent fired.
54 ***/
55 public void protocolReplyReceived(ProtocolCommandEvent event);
56
57 }