001    package railo.runtime.net.ftp;
002    
003    import java.io.IOException;
004    import java.net.InetAddress;
005    import java.net.SocketException;
006    
007    import org.apache.commons.net.ftp.FTPClient;
008    
009    import railo.commons.io.SystemUtil;
010    import railo.commons.lang.SystemOut;
011    
012    
013    /**
014     * 
015     */
016    public final class DebugFTPClient extends FTPClient {
017        
018        private static int count=0;
019        
020        /**
021         * @see org.apache.commons.net.SocketClient#disconnect()
022         */
023        public void disconnect() throws IOException {
024            SystemOut.printDate(SystemUtil.PRINTWRITER_OUT,"MyFTPClient.disconnect("+(--count)+")");
025            super.disconnect();
026        }
027        /**
028         * @see org.apache.commons.net.SocketClient#connect(java.net.InetAddress, int)
029         */
030        public void connect(InetAddress arg0, int arg1) throws SocketException,
031                IOException {
032            SystemOut.printDate(SystemUtil.PRINTWRITER_OUT,"MyFTPClient.connect("+(++count)+")");
033            super.connect(arg0, arg1);
034        }
035    }