    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 *      https://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;
    019
    020import java.util.EventListener;
    021
    022/**
    023 * There exists a large class of IETF protocols that work by sending an ASCII text command and arguments to a server, and then receiving an ASCII text reply.
    024 * For debugging and other purposes, it is extremely useful to log or keep track of the contents of the protocol messages. The ProtocolCommandListener interface
    025 * coupled with the {@link ProtocolCommandEvent} class facilitate this process.
    026 * <p>
    027 * To receive ProtocolCommandEvents, you merely implement the ProtocolCommandListener interface and register the class as a listener with a ProtocolCommandEvent
    028 * source such as {@link org.apache.commons.net.ftp.FTPClient}.
    029 * </p>
    030 *
    031 * @see ProtocolCommandEvent
    032 * @see ProtocolCommandSupport
    033 */
    034public interface ProtocolCommandListener extends EventListener {
    035
    036    /**
    037     * This method is invoked by a ProtocolCommandEvent source after sending a protocol command to a server.
    038     *
    039     * @param event The ProtocolCommandEvent fired.
    040     */
    041    void protocolCommandSent(ProtocolCommandEvent event);
    042
    043    /**
    044     * This method is invoked by a ProtocolCommandEvent source after receiving a reply from a server.
    045     *
    046     * @param event The ProtocolCommandEvent fired.
    047     */
    048    void protocolReplyReceived(ProtocolCommandEvent event);
    049
    050}