01: /*
02: * Copyright 2001-2005 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.apache.commons.net;
17:
18: import java.util.EventListener;
19:
20: /***
21: * There exists a large class of IETF protocols that work by sending an
22: * ASCII text command and arguments to a server, and then receiving an
23: * ASCII text reply. For debugging and other purposes, it is extremely
24: * useful to log or keep track of the contents of the protocol messages.
25: * The ProtocolCommandListener interface coupled with the
26: * {@link ProtocolCommandEvent} class facilitate this process.
27: * <p>
28: * To receive ProtocolCommandEvents, you merely implement the
29: * ProtocolCommandListener interface and register the class as a listener
30: * with a ProtocolCommandEvent source such as
31: * {@link org.apache.commons.net.ftp.FTPClient}.
32: * <p>
33: * <p>
34: * @see ProtocolCommandEvent
35: * @see ProtocolCommandSupport
36: * @author Daniel F. Savarese
37: ***/
38:
39: public interface ProtocolCommandListener extends EventListener {
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: }
|