001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package org.apache.commons.net;
019import java.util.EventListener;
020
021/***
022 * There exists a large class of IETF protocols that work by sending an
023 * ASCII text command and arguments to a server, and then receiving an
024 * ASCII text reply.  For debugging and other purposes, it is extremely
025 * useful to log or keep track of the contents of the protocol messages.
026 * The ProtocolCommandListener interface coupled with the
027 * {@link ProtocolCommandEvent} class facilitate this process.
028 * <p>
029 * To receive ProtocolCommandEvents, you merely implement the
030 * ProtocolCommandListener interface and register the class as a listener
031 * with a ProtocolCommandEvent source such as
032 * {@link org.apache.commons.net.ftp.FTPClient}.
033 *
034 *
035 * @see ProtocolCommandEvent
036 * @see ProtocolCommandSupport
037 ***/
038
039public interface ProtocolCommandListener extends EventListener
040{
041
042    /***
043     * This method is invoked by a ProtocolCommandEvent source after
044     * sending a protocol command to a server.
045     *
046     * @param event The ProtocolCommandEvent fired.
047     ***/
048    public void protocolCommandSent(ProtocolCommandEvent event);
049
050    /***
051     * This method is invoked by a ProtocolCommandEvent source after
052     * receiving a reply from a server.
053     *
054     * @param event The ProtocolCommandEvent fired.
055     ***/
056    public void protocolReplyReceived(ProtocolCommandEvent event);
057
058}