001 /* 002 * ftp4j - A pure Java FTP client library 003 * 004 * Copyright (C) 2008-2009 Carlo Pelliccia (www.sauronsoftware.it) 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU Lesser General Public License version 008 * 2.1, as published by the Free Software Foundation. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License version 2.1 along with this program. 017 * If not, see <http://www.gnu.org/licenses/>. 018 */ 019 package it.sauronsoftware.ftp4j; 020 021 /** 022 * This interface describes how to build objects used to intercept any 023 * communication between the client and the server. It is useful to catch what 024 * happens behind. A FTPCommunicationListener can be added to any FTPClient 025 * object by calling its addCommunicationListener() method. 026 * 027 * @author Carlo Pelliccia 028 * @see FTPClient#addCommunicationListener(FTPCommunicationListener) 029 */ 030 public interface FTPCommunicationListener { 031 032 /** 033 * Called every time a telnet statement has been sent over the network to 034 * the remote FTP server. 035 * 036 * @param statement 037 * The statement that has been sent. 038 */ 039 public void sent(String statement); 040 041 /** 042 * Called every time a telnet statement is received by the client. 043 * 044 * @param statement 045 * The received statement. 046 */ 047 public void received(String statement); 048 049 }