incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r493776 [1/2] - in /incubator/ftpserver/trunk/core/src: java/org/apache/ftpserver/ java/org/apache/ftpserver/command/ java/org/apache/ftpserver/interfaces/ test/org/apache/ftpserver/clienttests/ test/org/apache/ftpserver/interfaces/
Date Sun, 07 Jan 2007 17:12:33 GMT
Author: ngn
Date: Sun Jan  7 09:12:30 2007
New Revision: 493776

URL: http://svn.apache.org/viewvc?view=rev&rev=493776
Log:
Generalized use of RequestHandler to the Connection interface (in preperation for a MINA connection). Also renamed RequestHandler to IOConnection to clearer show it's use

Added:
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/IOConnection.java
      - copied, changed from r491945, incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/RequestHandler.java
Removed:
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/RequestHandler.java
Modified:
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/DefaultListener.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ABOR.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ACCT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/APPE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/AUTH.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CDUP.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CWD.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/DELE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPRT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPSV.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/FEAT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/HELP.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LANG.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LIST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MD5.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MDTM.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MKD.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLSD.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MODE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NLST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NOOP.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_MLST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_UTF8.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASS.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASV.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PBSZ.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PORT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PROT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PWD.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/QUIT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REIN.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RETR.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RMD.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNFR.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNTO.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_DESCUSER.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_HELP.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_STAT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_WHO.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_ZONE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SIZE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STAT.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STOR.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STOU.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STRU.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SYST.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/TYPE.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/USER.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Command.java
    incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Connection.java
    incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/ClientTestTemplate.java
    incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/FtpMd5Test.java
    incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/DefaultListener.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/DefaultListener.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/DefaultListener.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/DefaultListener.java Sun Jan  7 09:12:30 2007
@@ -105,7 +105,7 @@
                     continue;
                 }
 
-                Connection connection = new RequestHandler(serverContext, soc);
+                Connection connection = new IOConnection(serverContext, soc);
                 conManager.newConnection(connection);
             } catch (SocketException ex) {
                 return;

Copied: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/IOConnection.java (from r491945, incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/RequestHandler.java)
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/IOConnection.java?view=diff&rev=493776&p1=incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/RequestHandler.java&r1=491945&p2=incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/IOConnection.java&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/RequestHandler.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/IOConnection.java Sun Jan  7 09:12:30 2007
@@ -23,7 +23,9 @@
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.OutputStream;
 import java.net.InetAddress;
 import java.net.Socket;
 import java.net.SocketException;
@@ -58,7 +60,7 @@
  * @author <a href="mailto:rana_b@yahoo.com">Rana Bhattacharyya</a>
  */
 public 
-class RequestHandler implements Connection {
+class IOConnection implements Connection {
     
     private FtpServerContext serverContext;
     private Log log;
@@ -73,7 +75,7 @@
     /**
      * Constructor - set the control socket.
      */
-    public RequestHandler(FtpServerContext serverContext, Socket controlSocket) throws IOException {
+    public IOConnection(FtpServerContext serverContext, Socket controlSocket) throws IOException {
         this.serverContext = serverContext;
         this.controlSocket = controlSocket;
         log = this.serverContext.getLogFactory().getInstance(getClass());
@@ -251,7 +253,7 @@
     /**
      * Execute the ftp command.
      */
-    public void service(FtpRequestImpl request, FtpSessionImpl session, FtpWriter out) throws IOException, FtpException {
+    public void service(FtpRequest request, FtpSessionImpl session, FtpWriter out) throws IOException, FtpException {
         try {
             String commandName = request.getCommand();
             CommandFactory commandFactory = serverContext.getCommandFactory();
@@ -385,10 +387,13 @@
     /**
      * Transfer data.
      */
-    public final long transfer(BufferedInputStream in, 
-                               BufferedOutputStream out,
+    public final long transfer(InputStream in, 
+                               OutputStream out,
                                int maxRate) throws IOException {
         
+        BufferedInputStream bis = IoUtils.getBufferedInputStream(in);
+        BufferedOutputStream bos = IoUtils.getBufferedOutputStream( out );
+        
         boolean isAscii = session.getDataType() == DataType.ASCII;
         long startTime = System.currentTimeMillis();
         long transferredSize = 0L;
@@ -415,7 +420,7 @@
             }
             
             // read data
-            int count = in.read(buff);
+            int count = bis.read(buff);
             if(count == -1) {
                 break;
             }
@@ -426,13 +431,13 @@
                 for(int i=0; i<count; ++i) {
                     byte b = buff[i];
                     if(b == '\n') {
-                        out.write('\r');
+                        bos.write('\r');
                     }
-                    out.write(b);
+                    bos.write(b);
                 }
             }
             else {
-                out.write(buff, 0, count);
+                bos.write(buff, 0, count);
             }
             
             transferredSize += count;

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ABOR.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ABOR.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ABOR.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ABOR.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>ABOR &lt;CRLF&gt;</code><br>
@@ -46,7 +46,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ACCT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ACCT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ACCT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/ACCT.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>ACCT &lt;CRLF&gt;</code><br>
@@ -40,7 +40,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/APPE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/APPE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/APPE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/APPE.java Sun Jan  7 09:12:30 2007
@@ -28,16 +28,14 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
-import org.apache.ftpserver.ftplet.Authority;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
-import org.apache.ftpserver.usermanager.TransferRatePermission;
 import org.apache.ftpserver.usermanager.TransferRateRequest;
 import org.apache.ftpserver.util.IoUtils;
 
@@ -59,7 +57,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -68,7 +66,7 @@
         
             // reset state variables
             session.resetState();
-            FtpServerContext serverContext = handler.getServerContext();
+            FtpServerContext serverContext = connection.getServerContext();
             
             // argument check
             String fileName = request.getArgument();
@@ -90,7 +88,7 @@
                 return;
             }
             else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
             
@@ -158,7 +156,7 @@
                     maxRate = transferRateRequest.getMaxUploadRate();
                 }
                 
-                long transSz = handler.transfer(bis, bos, maxRate);
+                long transSz = connection.transfer(bis, bos, maxRate);
                 
                 // log message
                 String userName = session.getUser().getName();
@@ -167,7 +165,7 @@
                 
                 // notify the statistics component
                 ServerFtpStatistics ftpStat = (ServerFtpStatistics)serverContext.getFtpStatistics();
-                ftpStat.setUpload(handler, file, transSz);
+                ftpStat.setUpload(connection, file, transSz);
             }
             catch(SocketException e) {
                 log.debug("SocketException during file upload", e);
@@ -196,7 +194,7 @@
                     ftpletRet = FtpletEnum.RET_DISCONNECT;
                 }
                 if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                    serverContext.getConnectionManager().closeConnection(handler);
+                    serverContext.getConnectionManager().closeConnection(connection);
                     return;
                 }
 

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/AUTH.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/AUTH.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/AUTH.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/AUTH.java Sun Jan  7 09:12:30 2007
@@ -24,9 +24,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 
 /**
@@ -41,7 +41,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -56,7 +56,7 @@
         }
         
         // check SSL configuration
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         Log log = serverContext.getLogFactory().getInstance(getClass());
         if(serverContext.getSocketFactory().getSSL() == null) {
             out.send(431, "AUTH", null);
@@ -68,7 +68,7 @@
         if(authType.equals("SSL")) {
             out.send(234, "AUTH.SSL", null);
             try {
-                handler.createSecureSocket("SSL");
+                connection.createSecureSocket("SSL");
             }
             catch(FtpException ex) {
                 throw ex;
@@ -81,7 +81,7 @@
         else if(authType.equals("TLS")) {
             out.send(234, "AUTH.TLS", null);
             try {
-                handler.createSecureSocket("TLS");
+                connection.createSecureSocket("TLS");
             }
             catch(FtpException ex) {
                 throw ex;

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CDUP.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CDUP.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CDUP.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CDUP.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileSystemView;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>CDUP &lt;CRLF&gt;</code><br>
@@ -45,7 +45,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CWD.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CWD.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CWD.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/CWD.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileSystemView;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>CWD  &lt;SP&gt; &lt;pathname&gt; &lt;CRLF&gt;</code><br>
@@ -45,7 +45,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/DELE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/DELE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/DELE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/DELE.java Sun Jan  7 09:12:30 2007
@@ -24,12 +24,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
 
@@ -48,14 +48,14 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
         
         // reset state variables
         session.resetState(); 
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         
         // argument check
         String fileName = request.getArgument();
@@ -78,7 +78,7 @@
             return;
         }
         else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-            serverContext.getConnectionManager().closeConnection(handler);
+            serverContext.getConnectionManager().closeConnection(connection);
             return;
         }
 
@@ -115,7 +115,7 @@
             
             // notify statistics object
             ServerFtpStatistics ftpStat = (ServerFtpStatistics)serverContext.getFtpStatistics();
-            ftpStat.setDelete(handler, file);
+            ftpStat.setDelete(connection, file);
             
             // call Ftplet.onDeleteEnd() method
             try{
@@ -125,7 +125,7 @@
                 ftpletRet = FtpletEnum.RET_DISCONNECT;
             }
             if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
 

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPRT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPRT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPRT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPRT.java Sun Jan  7 09:12:30 2007
@@ -25,8 +25,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.DataConnectionConfig;
 
 /**
@@ -45,7 +45,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {
@@ -61,7 +61,7 @@
         }
         
         // is port enabled
-        DataConnectionConfig dataCfg = handler.getServerContext().getDataConnectionConfig();
+        DataConnectionConfig dataCfg = connection.getServerContext().getDataConnectionConfig();
         if(!dataCfg.isActiveEnabled()) {
             out.send(510, "EPRT.disabled", null);
             return;

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPSV.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPSV.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPSV.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/EPSV.java Sun Jan  7 09:12:30 2007
@@ -24,8 +24,8 @@
 import org.apache.ftpserver.FtpDataConnection;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * The EPSV command requests that a server listen on a data port and
@@ -47,7 +47,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/FEAT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/FEAT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/FEAT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/FEAT.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * The FEAT command (introduced in [RFC-2389]) allows servers with
@@ -38,7 +38,7 @@
 public 
 class FEAT extends AbstractCommand {
 
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/HELP.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/HELP.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/HELP.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/HELP.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.MessageResource;
 
 /**
@@ -44,7 +44,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {
@@ -60,7 +60,7 @@
         
         // print command specific help if available
         String ftpCmd = request.getArgument().toUpperCase();
-        MessageResource resource = handler.getServerContext().getMessageResource();
+        MessageResource resource = connection.getServerContext().getMessageResource();
         if(resource.getMessage(214, ftpCmd, session.getLanguage()) == null) {
             ftpCmd = null;
         }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LANG.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LANG.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LANG.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LANG.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.MessageResource;
 
 /**
@@ -41,7 +41,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -59,7 +59,7 @@
         
         // check and set language
         language = language.toLowerCase();
-        MessageResource msgResource = handler.getServerContext().getMessageResource();
+        MessageResource msgResource = connection.getServerContext().getMessageResource();
         String[] availableLanguages = msgResource.getAvailableLanguages();
         if(availableLanguages != null) {
             for(int i=0; i<availableLanguages.length; ++i) {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LIST.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LIST.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LIST.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/LIST.java Sun Jan  7 09:12:30 2007
@@ -27,9 +27,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.listing.DirectoryLister;
 import org.apache.ftpserver.listing.LISTFileFormater;
 import org.apache.ftpserver.listing.ListArgument;
@@ -59,7 +59,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MD5.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MD5.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MD5.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MD5.java Sun Jan  7 09:12:30 2007
@@ -27,9 +27,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.util.IoUtils;
 
 /**
@@ -46,7 +46,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MDTM.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MDTM.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MDTM.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MDTM.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.util.DateUtils;
 
 /**
@@ -42,7 +42,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MKD.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MKD.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MKD.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MKD.java Sun Jan  7 09:12:30 2007
@@ -24,12 +24,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
 
@@ -50,14 +50,14 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
         
         // reset state
         session.resetState(); 
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         
         // argument check
         String fileName = request.getArgument();
@@ -79,7 +79,7 @@
             return;
         }
         else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-            serverContext.getConnectionManager().closeConnection(handler);
+            serverContext.getConnectionManager().closeConnection(connection);
             return;
         }
         
@@ -119,8 +119,8 @@
             log.info("Directory create : " + userName + " - " + fileName);
             
             // notify statistics object
-            ServerFtpStatistics ftpStat = (ServerFtpStatistics)handler.getServerContext().getFtpStatistics();
-            ftpStat.setMkdir(handler, file);
+            ServerFtpStatistics ftpStat = (ServerFtpStatistics)connection.getServerContext().getFtpStatistics();
+            ftpStat.setMkdir(connection, file);
             
             // call Ftplet.onMkdirEnd() method
             try{
@@ -130,7 +130,7 @@
                 ftpletRet = FtpletEnum.RET_DISCONNECT;
             }
             if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
 

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLSD.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLSD.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLSD.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLSD.java Sun Jan  7 09:12:30 2007
@@ -27,9 +27,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.listing.DirectoryLister;
 import org.apache.ftpserver.listing.FileFormater;
 import org.apache.ftpserver.listing.ListArgument;
@@ -56,7 +56,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLST.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLST.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLST.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MLST.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.listing.FileFormater;
 import org.apache.ftpserver.listing.ListArgument;
 import org.apache.ftpserver.listing.ListArgumentParser;
@@ -45,7 +45,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MODE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MODE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MODE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/MODE.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>MODE &lt;SP&gt; <mode-code> &lt;CRLF&gt;</code><br>
@@ -41,7 +41,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                        FtpRequest request,
                        FtpSessionImpl session, 
                        FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NLST.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NLST.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NLST.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NLST.java Sun Jan  7 09:12:30 2007
@@ -27,9 +27,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.listing.DirectoryLister;
 import org.apache.ftpserver.listing.FileFormater;
 import org.apache.ftpserver.listing.LISTFileFormater;
@@ -60,7 +60,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NOOP.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NOOP.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NOOP.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/NOOP.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>NOOP &lt;CRLF&gt;</code><br>
@@ -42,7 +42,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS.java Sun Jan  7 09:12:30 2007
@@ -22,13 +22,12 @@
 import java.io.IOException;
 import java.util.HashMap;
 
-import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.interfaces.Command;
+import org.apache.ftpserver.interfaces.Connection;
 
 
 /**
@@ -48,7 +47,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -75,7 +74,7 @@
         Command command = (Command)COMMAND_MAP.get( optsRequest );
         try {
             if(command != null) {
-                command.execute(handler, request, session, out);
+                command.execute(connection, request, session, out);
             }
             else {
                 session.resetState();
@@ -83,7 +82,6 @@
             }
         }
         catch(Exception ex) {
-            Log log = handler.getServerContext().getLogFactory().getInstance(getClass());
             log.warn("OPTS.execute()", ex);
             session.resetState();
             out.send(500, "OPTS", null);

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_MLST.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_MLST.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_MLST.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_MLST.java Sun Jan  7 09:12:30 2007
@@ -24,9 +24,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * Client-Server listing negotation.
@@ -48,7 +48,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request, 
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_UTF8.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_UTF8.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_UTF8.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/OPTS_UTF8.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 
 /**
@@ -42,7 +42,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASS.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASS.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASS.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASS.java Sun Jan  7 09:12:30 2007
@@ -28,7 +28,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.Authentication;
 import org.apache.ftpserver.ftplet.AuthenticationFailedException;
 import org.apache.ftpserver.ftplet.FileSystemManager;
@@ -39,6 +38,7 @@
 import org.apache.ftpserver.ftplet.FtpletEnum;
 import org.apache.ftpserver.ftplet.User;
 import org.apache.ftpserver.ftplet.UserManager;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.ConnectionManager;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
@@ -61,13 +61,13 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
     
         boolean success = false;
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         Log log = serverContext.getLogFactory().getInstance(getClass());
         ConnectionManager conManager = serverContext.getConnectionManager();
         ServerFtpStatistics stat = (ServerFtpStatistics)serverContext.getFtpStatistics();
@@ -120,7 +120,7 @@
             User authenticatedUser = null;
             try {
                 UserMetadata userMetadata = new UserMetadata();
-                Socket controlSocket = handler.getControlSocket();
+                Socket controlSocket = connection.getControlSocket();
                 userMetadata.setInetAddress(controlSocket.getInetAddress());
                 
                 if(controlSocket instanceof SSLSocket) {
@@ -180,7 +180,7 @@
                     ftpletRet = FtpletEnum.RET_DISCONNECT;
                 }
                 if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                    serverContext.getConnectionManager().closeConnection(handler);
+                    serverContext.getConnectionManager().closeConnection(connection);
                     return;
                 } else if(ftpletRet == FtpletEnum.RET_SKIP) {
                     success = false;
@@ -195,7 +195,7 @@
                 
                 log.warn("Login failure - " + userName);
                 out.send(530, "PASS", userName);
-                stat.setLoginFail(handler);
+                stat.setLoginFail(connection);
                 return;
             }
             
@@ -203,7 +203,7 @@
             FileSystemManager fmanager = serverContext.getFileSystemManager(); 
             FileSystemView fsview = fmanager.createFileSystemView(authenticatedUser);
             session.setLogin(fsview);
-            stat.setLogin(handler);
+            stat.setLogin(connection);
 
             // everything is fine - send login ok message
             out.send(230, "PASS", userName);

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASV.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASV.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASV.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PASV.java Sun Jan  7 09:12:30 2007
@@ -25,9 +25,9 @@
 import org.apache.ftpserver.FtpDataConnection;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>PASV &lt;CRLF&gt;</code><br>
@@ -46,7 +46,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PBSZ.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PBSZ.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PBSZ.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PBSZ.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * Protection buffer size.
@@ -38,7 +38,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PORT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PORT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PORT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PORT.java Sun Jan  7 09:12:30 2007
@@ -26,8 +26,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.DataConnectionConfig;
 
 /**
@@ -56,7 +56,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {
@@ -77,7 +77,7 @@
         }
         
         // is port enabled
-        DataConnectionConfig dataCfg = handler.getServerContext().getDataConnectionConfig();
+        DataConnectionConfig dataCfg = connection.getServerContext().getDataConnectionConfig();
         if(!dataCfg.isActiveEnabled()) {
             out.send(510, "PORT.disabled", null);
             return;

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PROT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PROT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PROT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PROT.java Sun Jan  7 09:12:30 2007
@@ -24,9 +24,9 @@
 import org.apache.ftpserver.FtpDataConnection;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 
 /**
@@ -40,7 +40,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -63,7 +63,7 @@
             out.send(200, "PROT", null);
         }
         else if(arg.equals("P")) {
-            FtpServerContext serverContext = handler.getServerContext();
+            FtpServerContext serverContext = connection.getServerContext();
             if(serverContext.getDataConnectionConfig().getSSL() == null) {
                 out.send(431, "PROT", null);
             }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PWD.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PWD.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PWD.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/PWD.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileSystemView;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>PWD  &lt;CRLF&gt;</code><br>
@@ -42,7 +42,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/QUIT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/QUIT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/QUIT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/QUIT.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>QUIT &lt;CRLF&gt;</code><br>
@@ -40,13 +40,13 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {
         session.resetState();
         out.send(221, "QUIT", null);
-        handler.getServerContext().getConnectionManager().closeConnection(handler);
+        connection.getServerContext().getConnectionManager().closeConnection(connection);
     }
 
 }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REIN.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REIN.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REIN.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REIN.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
   * <code>REIN &lt;CRLF&gt;</code><br>
@@ -40,7 +40,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REST.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REST.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REST.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/REST.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>REST &lt;SP&gt; <marker> &lt;CRLF&gt;</code><br>
@@ -44,7 +44,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RETR.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RETR.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RETR.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RETR.java Sun Jan  7 09:12:30 2007
@@ -29,17 +29,15 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
-import org.apache.ftpserver.ftplet.Authority;
 import org.apache.ftpserver.ftplet.DataType;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
-import org.apache.ftpserver.usermanager.TransferRatePermission;
 import org.apache.ftpserver.usermanager.TransferRateRequest;
 import org.apache.ftpserver.util.IoUtils;
 
@@ -60,7 +58,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -69,7 +67,7 @@
         
             // get state variable
             long skipLen = session.getFileOffset();
-            FtpServerContext serverContext = handler.getServerContext();
+            FtpServerContext serverContext = connection.getServerContext();
             
             // argument check
             String fileName = request.getArgument();
@@ -91,7 +89,7 @@
                 return;
             }
             else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
             
@@ -146,7 +144,7 @@
             try {
                 
                 // open streams
-                bis = IoUtils.getBufferedInputStream(openInputStream(handler, session, file, skipLen) );
+                bis = IoUtils.getBufferedInputStream(openInputStream(connection, session, file, skipLen) );
                 bos = IoUtils.getBufferedOutputStream(os);
                 
                 // transfer data
@@ -158,7 +156,7 @@
                     maxRate = transferRateRequest.getMaxDownloadRate();
                 }
                 
-                long transSz = handler.transfer(bis, bos, maxRate);
+                long transSz = connection.transfer(bis, bos, maxRate);
                 
                 // log message
                 String userName = session.getUser().getName();
@@ -167,7 +165,7 @@
                 
                 // notify the statistics component
                 ServerFtpStatistics ftpStat = (ServerFtpStatistics)serverContext.getFtpStatistics();
-                ftpStat.setDownload(handler, file, transSz);
+                ftpStat.setDownload(connection, file, transSz);
             }
             catch(SocketException ex) {
                 log.debug("Socket exception during data transfer", ex);
@@ -196,7 +194,7 @@
                     ftpletRet = FtpletEnum.RET_DISCONNECT;
                 }
                 if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                    serverContext.getConnectionManager().closeConnection(handler);
+                    serverContext.getConnectionManager().closeConnection(connection);
                     return;
                 }
 
@@ -211,7 +209,7 @@
     /**
      * Skip length and open input stream.
      */
-    public InputStream openInputStream(RequestHandler handler,
+    public InputStream openInputStream(Connection connection,
                                        FtpSessionImpl session, 
                                        FileObject file, 
                                        long skipLen) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RMD.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RMD.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RMD.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RMD.java Sun Jan  7 09:12:30 2007
@@ -24,12 +24,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
 
@@ -50,14 +50,14 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
         
         // reset state variables
         session.resetState();
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         
         // argument check
         String fileName = request.getArgument();
@@ -79,7 +79,7 @@
             return;
         }
         else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-            serverContext.getConnectionManager().closeConnection(handler);
+            serverContext.getConnectionManager().closeConnection(connection);
             return;
         }
         
@@ -120,7 +120,7 @@
             
             // notify statistics object
             ServerFtpStatistics ftpStat = (ServerFtpStatistics)serverContext.getFtpStatistics();
-            ftpStat.setRmdir(handler, file);
+            ftpStat.setRmdir(connection, file);
             
             // call Ftplet.onRmdirEnd() method
             try{
@@ -130,7 +130,7 @@
                 ftpletRet = FtpletEnum.RET_DISCONNECT;
             }
             if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
 

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNFR.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNFR.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNFR.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNFR.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>RNFR &lt;SP&gt; &lt;pathname&gt; &lt;CRLF&gt;</code><br>
@@ -43,7 +43,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNTO.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNTO.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNTO.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/RNTO.java Sun Jan  7 09:12:30 2007
@@ -24,12 +24,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 
 /**
@@ -49,7 +49,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -63,7 +63,7 @@
             }
             
             // call Ftplet.onRenameStart() method
-            FtpServerContext serverContext = handler.getServerContext();
+            FtpServerContext serverContext = connection.getServerContext();
             Ftplet ftpletContainer = serverContext.getFtpletContainer();
             FtpletEnum ftpletRet;
             try {
@@ -76,7 +76,7 @@
                 return;
             }
             else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                serverContext.getConnectionManager().closeConnection(handler);
+                serverContext.getConnectionManager().closeConnection(connection);
                 return;
             }
             
@@ -129,7 +129,7 @@
                     ftpletRet = FtpletEnum.RET_DISCONNECT;
                 }
                 if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-                    serverContext.getConnectionManager().closeConnection(handler);
+                    serverContext.getConnectionManager().closeConnection(connection);
                     return;
                 }
             }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE.java Sun Jan  7 09:12:30 2007
@@ -25,12 +25,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
 import org.apache.ftpserver.interfaces.Command;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 
 
@@ -48,13 +48,13 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
         
         // call Ftplet.onSite method
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         Ftplet ftpletContainer = serverContext.getFtpletContainer();
         FtpletEnum ftpletRet;
         try {
@@ -67,7 +67,7 @@
             return;
         }
         else if(ftpletRet == FtpletEnum.RET_DISCONNECT) {
-            serverContext.getConnectionManager().closeConnection(handler);
+            serverContext.getConnectionManager().closeConnection(connection);
             return;
         }
         
@@ -93,7 +93,7 @@
         Command command = (Command)COMMAND_MAP.get( siteRequest );
         try {
             if(command != null) {
-                command.execute(handler, request, session, out);
+                command.execute(connection, request, session, out);
             }
             else {
                 session.resetState();

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_DESCUSER.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_DESCUSER.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_DESCUSER.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_DESCUSER.java Sun Jan  7 09:12:30 2007
@@ -23,13 +23,12 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.User;
 import org.apache.ftpserver.ftplet.UserManager;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.interfaces.FtpServerContext;
-import org.apache.ftpserver.usermanager.TransferRatePermission;
 import org.apache.ftpserver.usermanager.TransferRateRequest;
 import org.apache.ftpserver.usermanager.WriteRequest;
 
@@ -44,7 +43,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -53,7 +52,7 @@
         session.resetState();
         
         // only administrator can execute this
-        UserManager userManager = handler.getServerContext().getUserManager(); 
+        UserManager userManager = connection.getServerContext().getUserManager(); 
         boolean isAdmin = userManager.isAdmin(session.getUser().getName());
         if(!isAdmin) {
             out.send(530, "SITE", null);
@@ -70,7 +69,7 @@
         String userName = argument.substring(spIndex + 1);
         
         // check the user existance
-        FtpServerContext serverContext = handler.getServerContext();
+        FtpServerContext serverContext = connection.getServerContext();
         UserManager usrManager = serverContext.getUserManager();
         User user = null;
         try {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_HELP.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_HELP.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_HELP.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_HELP.java Sun Jan  7 09:12:30 2007
@@ -23,9 +23,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 
 /**
@@ -39,7 +39,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_STAT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_STAT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_STAT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_STAT.java Sun Jan  7 09:12:30 2007
@@ -23,11 +23,11 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.FtpStatistics;
 import org.apache.ftpserver.ftplet.UserManager;
+import org.apache.ftpserver.interfaces.Connection;
 import org.apache.ftpserver.util.DateUtils;
 
 /**
@@ -41,7 +41,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
             FtpRequest request,
             FtpSessionImpl session, 
             FtpWriter out) throws IOException, FtpException {
@@ -50,7 +50,7 @@
         session.resetState();
         
         // only administrator can execute this
-        UserManager userManager = handler.getServerContext().getUserManager(); 
+        UserManager userManager = connection.getServerContext().getUserManager(); 
         boolean isAdmin = userManager.isAdmin(session.getUser().getName());
         if(!isAdmin) {
             out.send(530, "SITE", null);
@@ -58,7 +58,7 @@
         }
         
         // get statistics information
-        FtpStatistics stat = handler.getServerContext().getFtpStatistics();
+        FtpStatistics stat = connection.getServerContext().getFtpStatistics();
         StringBuffer sb = new StringBuffer(256);
         sb.append('\n');
         sb.append("Start Time               : ").append( DateUtils.getISO8601Date(stat.getStartTime().getTime()) ).append('\n');

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_WHO.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_WHO.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_WHO.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_WHO.java Sun Jan  7 09:12:30 2007
@@ -25,7 +25,6 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
 import org.apache.ftpserver.ftplet.FtpSession;
@@ -47,7 +46,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {
@@ -56,7 +55,7 @@
         session.resetState();
         
         // only administrator can execute this
-        UserManager userManager = handler.getServerContext().getUserManager(); 
+        UserManager userManager = connection.getServerContext().getUserManager(); 
         boolean isAdmin = userManager.isAdmin(session.getUser().getName());
         if(!isAdmin) {
             out.send(530, "SITE", null);
@@ -65,7 +64,7 @@
         
         // print all the connected user information
         StringBuffer sb = new StringBuffer();
-        List allCons = handler.getServerContext().getConnectionManager().getAllConnections();
+        List allCons = connection.getServerContext().getConnectionManager().getAllConnections();
         
         sb.append('\n');
         for(Iterator conIt = allCons.iterator(); conIt.hasNext(); ) {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_ZONE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_ZONE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_ZONE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SITE_ZONE.java Sun Jan  7 09:12:30 2007
@@ -25,9 +25,9 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * Displays the FTP server timezone in RFC 822 format.
@@ -42,7 +42,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
             FtpRequest request,
             FtpSessionImpl session, 
             FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SIZE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SIZE.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SIZE.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/SIZE.java Sun Jan  7 09:12:30 2007
@@ -23,10 +23,10 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>SIZE &lt;SP&gt; &lt;pathname&gt; &lt;CRLF&gt;</code><br>
@@ -41,7 +41,7 @@
     /**
      * Execute command.
      */
-    public void execute(RequestHandler handler,
+    public void execute(Connection connection,
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException, FtpException {

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STAT.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STAT.java?view=diff&rev=493776&r1=493775&r2=493776
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STAT.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/command/STAT.java Sun Jan  7 09:12:30 2007
@@ -23,8 +23,8 @@
 
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
-import org.apache.ftpserver.RequestHandler;
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.interfaces.Connection;
 
 /**
  * <code>STAT [&lt;SP&gt; &lt;pathname&gt;] &lt;CRLF&gt;</code><br>
@@ -40,7 +40,7 @@
     /**
      * Execute command
      */
-    public void execute(RequestHandler handler, 
+    public void execute(Connection connection, 
                         FtpRequest request,
                         FtpSessionImpl session, 
                         FtpWriter out) throws IOException {



Mime
View raw message