incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r491831 [3/4] - in /incubator/ftpserver/trunk: admin-gui/src/java/org/apache/ftpserver/gui/ core/src/java/org/apache/ftpserver/ core/src/java/org/apache/ftpserver/command/ core/src/java/org/apache/ftpserver/ftplet/ core/src/java/org/apache/...
Date Tue, 02 Jan 2007 16:17:26 GMT
Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java Tue Jan  2 08:17:22 2007
@@ -126,12 +126,12 @@
     /**
      * Call ftplet onConnect.
      */
-    public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onConnect(request, response);
+            retVal = ftpletEnt.ftplet.onConnect(session, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -147,12 +147,12 @@
     /**
      * Call ftplet onDisconnect.
      */
-    public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onDisconnect(request, response);
+            retVal = ftpletEnt.ftplet.onDisconnect(session, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -168,12 +168,12 @@
     /**
      * Call ftplet onLogin.
      */
-    public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onLogin(request, response);
+            retVal = ftpletEnt.ftplet.onLogin(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -189,12 +189,12 @@
     /** 
      * Call ftplet onDeleteStart.
      */
-    public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onDeleteStart(request, response);
+            retVal = ftpletEnt.ftplet.onDeleteStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -211,12 +211,12 @@
     /**
      * Call ftplet onDeleteEnd.
      */
-    public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onDeleteEnd(request, response);
+            retVal = ftpletEnt.ftplet.onDeleteEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -232,12 +232,12 @@
     /**
      * Call ftplet onUploadStart.
      */
-    public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onUploadStart(request, response);
+            retVal = ftpletEnt.ftplet.onUploadStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -253,12 +253,12 @@
     /**
      * Call ftplet onUploadEnd.
      */
-    public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onUploadEnd(request, response);
+            retVal = ftpletEnt.ftplet.onUploadEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -274,12 +274,12 @@
     /**
      * Call ftplet onDownloadStart.
      */
-    public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onDownloadStart(request, response);
+            retVal = ftpletEnt.ftplet.onDownloadStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -295,12 +295,12 @@
     /**
      * Call ftplet onDownloadEnd.
      */
-    public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onDownloadEnd(request, response);
+            retVal = ftpletEnt.ftplet.onDownloadEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -316,12 +316,12 @@
     /**
      * Call ftplet onRmdirStart.
      */
-    public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onRmdirStart(request, response);
+            retVal = ftpletEnt.ftplet.onRmdirStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -337,12 +337,12 @@
     /**
      * Call ftplet onRmdirEnd.
      */
-    public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onRmdirEnd(request, response);
+            retVal = ftpletEnt.ftplet.onRmdirEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -358,12 +358,12 @@
     /**
      * Call ftplet onMkdirStart.
      */
-    public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onMkdirStart(request, response);
+            retVal = ftpletEnt.ftplet.onMkdirStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -379,12 +379,12 @@
     /** 
      * Call ftplet onMkdirEnd.
      */
-    public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onMkdirEnd(request, response);
+            retVal = ftpletEnt.ftplet.onMkdirEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -400,12 +400,12 @@
     /**
      * Call ftplet onAppendStart.
      */
-    public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onAppendStart(request, response);
+            retVal = ftpletEnt.ftplet.onAppendStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -421,12 +421,12 @@
     /**
      * Call ftplet onAppendEnd.
      */
-    public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onAppendEnd(request, response);
+            retVal = ftpletEnt.ftplet.onAppendEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -442,12 +442,12 @@
     /**
      * Call ftplet onUploadUniqueStart.
      */
-    public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onUploadUniqueStart(request, response);
+            retVal = ftpletEnt.ftplet.onUploadUniqueStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -463,12 +463,12 @@
     /**
      * Call ftplet onUploadUniqueEnd.
      */
-    public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onUploadUniqueEnd(request, response);
+            retVal = ftpletEnt.ftplet.onUploadUniqueEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -484,12 +484,12 @@
     /**
      * Call ftplet onRenameStart.
      */
-    public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onRenameStart(request, response);
+            retVal = ftpletEnt.ftplet.onRenameStart(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -505,12 +505,12 @@
     /**
      * Call ftplet onRenameEnd.
      */
-    public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onRenameEnd(request, response);
+            retVal = ftpletEnt.ftplet.onRenameEnd(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -526,12 +526,12 @@
     /**
      * Call ftplet onSite.
      */
-    public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         FtpletEnum retVal = FtpletEnum.RET_DEFAULT;
         int sz = ftplets.size();
         for(int i=0; i<sz; ++i) {
             FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
-            retVal = ftpletEnt.ftplet.onSite(request, response);
+            retVal = ftpletEnt.ftplet.onSite(session, request, response);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Command.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Command.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Command.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Command.java Tue Jan  2 08:17:22 2007
@@ -21,10 +21,11 @@
 
 import java.io.IOException;
 
-import org.apache.ftpserver.FtpRequestImpl;
+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;
 
 /**
  * This interface encapsulates all the FTP commands. 
@@ -38,7 +39,8 @@
      * Execute command.
      */
     void execute(RequestHandler handler, 
-                 FtpRequestImpl request, 
+                 FtpRequest request,
+                 FtpSessionImpl session, 
                  FtpWriter out) throws IOException, FtpException;
     
 }

Modified: incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Connection.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Connection.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Connection.java (original)
+++ incubator/ftpserver/trunk/core/src/java/org/apache/ftpserver/interfaces/Connection.java Tue Jan  2 08:17:22 2007
@@ -20,6 +20,7 @@
 package org.apache.ftpserver.interfaces;
 
 import org.apache.ftpserver.ftplet.FtpRequest;
+import org.apache.ftpserver.ftplet.FtpSession;
 
 /**
  * This is the connection request handler interface.
@@ -30,9 +31,9 @@
 interface Connection extends Runnable {
 
     /**
-     * Get current request.
+     * Get current session.
      */
-    FtpRequest getRequest();
+    FtpSession getSession();
     
     /**
      * Close handler.

Added: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/FtpRequestImplTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/FtpRequestImplTest.java?view=auto&rev=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/FtpRequestImplTest.java (added)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/FtpRequestImplTest.java Tue Jan  2 08:17:22 2007
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */  
+
+package org.apache.ftpserver;
+
+import junit.framework.TestCase;
+
+
+public class FtpRequestImplTest extends TestCase {
+
+    public void testCommandOnly() {
+        FtpRequestImpl request = new FtpRequestImpl("foo");
+        
+        assertEquals("foo", request.getRequestLine());
+        assertEquals("FOO", request.getCommand());
+        assertFalse(request.hasArgument());
+        assertNull(request.getArgument());
+    }
+
+    public void testCommandAndSingleArgument() {
+        FtpRequestImpl request = new FtpRequestImpl("foo bar");
+        
+        assertEquals("foo bar", request.getRequestLine());
+        assertEquals("FOO", request.getCommand());
+        assertTrue(request.hasArgument());
+        assertEquals("bar", request.getArgument());
+    }
+
+    public void testCommandAndMultipleArguments() {
+        FtpRequestImpl request = new FtpRequestImpl("foo bar baz");
+        
+        assertEquals("foo bar baz", request.getRequestLine());
+        assertEquals("FOO", request.getCommand());
+        assertTrue(request.hasArgument());
+        assertEquals("bar baz", request.getArgument());
+    }
+}

Propchange: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/FtpRequestImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetContainerTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetContainerTestTemplate.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetContainerTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetContainerTestTemplate.java Tue Jan  2 08:17:22 2007
@@ -26,6 +26,7 @@
 import junit.framework.TestCase;
 
 import org.apache.ftpserver.FtpRequestImpl;
+import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.FtpWriter;
 
 
@@ -93,22 +94,22 @@
     
     public void testOnConnect() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onConnect(request, response);
+                return super.onConnect(session, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onConnect(request, response);
+                return super.onConnect(session, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onConnect(new FtpRequestImpl(), new FtpWriter());
+        container.onConnect(new FtpSessionImpl(), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -117,22 +118,22 @@
     
     public void testOnDisconnect() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onDisconnect(request, response);
+                return super.onDisconnect(session, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onDisconnect(request, response);
+                return super.onDisconnect(session, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onDisconnect(new FtpRequestImpl(), new FtpWriter());
+        container.onDisconnect(new FtpSessionImpl(), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -141,22 +142,22 @@
     
     public void testOnLogin() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onLogin(request, response);
+                return super.onLogin(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onLogin(request, response);
+                return super.onLogin(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onLogin(new FtpRequestImpl(), new FtpWriter());
+        container.onLogin(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -165,22 +166,22 @@
     
     public void testOnDeleteStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onDeleteStart(request, response);
+                return super.onDeleteStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onDeleteStart(request, response);
+                return super.onDeleteStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onDeleteStart(new FtpRequestImpl(), new FtpWriter());
+        container.onDeleteStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -189,22 +190,22 @@
 
     public void testOnDeleteEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onDeleteEnd(request, response);
+                return super.onDeleteEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onDeleteEnd(request, response);
+                return super.onDeleteEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onDeleteEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onDeleteEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -213,22 +214,22 @@
 
     public void testOnUploadStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onUploadStart(request, response);
+                return super.onUploadStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onUploadStart(request, response);
+                return super.onUploadStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onUploadStart(new FtpRequestImpl(), new FtpWriter());
+        container.onUploadStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -237,22 +238,22 @@
 
     public void testOnUploadEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onUploadEnd(request, response);
+                return super.onUploadEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onUploadEnd(request, response);
+                return super.onUploadEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onUploadEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onUploadEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -261,22 +262,22 @@
 
     public void testOnDownloadStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onDownloadStart(request, response);
+                return super.onDownloadStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onDownloadStart(request, response);
+                return super.onDownloadStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onDownloadStart(new FtpRequestImpl(), new FtpWriter());
+        container.onDownloadStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -285,22 +286,22 @@
     
     public void testOnDownloadEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onDownloadEnd(request, response);
+                return super.onDownloadEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onDownloadEnd(request, response);
+                return super.onDownloadEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onDownloadEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onDownloadEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -309,22 +310,22 @@
     
     public void testOnRmdirStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onRmdirStart(request, response);
+                return super.onRmdirStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onRmdirStart(request, response);
+                return super.onRmdirStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onRmdirStart(new FtpRequestImpl(), new FtpWriter());
+        container.onRmdirStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -333,22 +334,22 @@
     
     public void testOnRmdirEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onRmdirEnd(request, response);
+                return super.onRmdirEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onRmdirEnd(request, response);
+                return super.onRmdirEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onRmdirEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onRmdirEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -357,22 +358,22 @@
     
     public void testOnMkdirStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onMkdirStart(request, response);
+                return super.onMkdirStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onMkdirStart(request, response);
+                return super.onMkdirStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onMkdirStart(new FtpRequestImpl(), new FtpWriter());
+        container.onMkdirStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -381,22 +382,22 @@
 
     public void testOnMkdirEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onMkdirEnd(request, response);
+                return super.onMkdirEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onMkdirEnd(request, response);
+                return super.onMkdirEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onMkdirEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onMkdirEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -405,22 +406,22 @@
     
     public void testOnAppendStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onAppendStart(request, response);
+                return super.onAppendStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onAppendStart(request, response);
+                return super.onAppendStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onAppendStart(new FtpRequestImpl(), new FtpWriter());
+        container.onAppendStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -429,22 +430,22 @@
     
     public void testOnAppendEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onAppendEnd(request, response);
+                return super.onAppendEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onAppendEnd(request, response);
+                return super.onAppendEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onAppendEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onAppendEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -453,22 +454,22 @@
     
     public void testOnUploadUniqueStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onUploadUniqueStart(request, response);
+                return super.onUploadUniqueStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onUploadUniqueStart(request, response);
+                return super.onUploadUniqueStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onUploadUniqueStart(new FtpRequestImpl(), new FtpWriter());
+        container.onUploadUniqueStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -477,22 +478,22 @@
 
     public void testOnUploadUniqueEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onUploadUniqueEnd(request, response);
+                return super.onUploadUniqueEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onUploadUniqueEnd(request, response);
+                return super.onUploadUniqueEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onUploadUniqueEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onUploadUniqueEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -501,22 +502,22 @@
     
     public void testOnRenameStart() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onRenameStart(request, response);
+                return super.onRenameStart(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onRenameStart(request, response);
+                return super.onRenameStart(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onRenameStart(new FtpRequestImpl(), new FtpWriter());
+        container.onRenameStart(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -525,22 +526,22 @@
     
     public void testOnRenameEnd() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onRenameEnd(request, response);
+                return super.onRenameEnd(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onRenameEnd(request, response);
+                return super.onRenameEnd(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onRenameEnd(new FtpRequestImpl(), new FtpWriter());
+        container.onRenameEnd(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));
@@ -549,22 +550,22 @@
     
     public void testOnSite() throws FtpException, IOException {
         MockFtplet ftplet1 = new MockFtplet() {
-            public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet1");
-                return super.onSite(request, response);
+                return super.onSite(session, request, response);
             }
         };
         MockFtplet ftplet2 = new MockFtplet() {
-            public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 calls.add("ftplet2");
-                return super.onSite(request, response);
+                return super.onSite(session, request, response);
             }
         };
         
         container.addFtplet("ftplet1", ftplet1);
         container.addFtplet("ftplet2", ftplet2);
         
-        container.onSite(new FtpRequestImpl(), new FtpWriter());
+        container.onSite(new FtpSessionImpl(), new FtpRequestImpl("foo"), new FtpWriter());
         
         assertEquals(2, calls.size());
         assertEquals("ftplet1", calls.get(0));

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java Tue Jan  2 08:17:22 2007
@@ -69,10 +69,10 @@
 
     public void testLogin() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-                assertNotNull(request.getUser());
+            public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+                assertNotNull(session.getUser());
                 
-                return super.onLogin(request, response);
+                return super.onLogin(session, request, response);
             }
             
         };

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDisconnectTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDisconnectTest.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDisconnectTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnDisconnectTest.java Tue Jan  2 08:17:22 2007
@@ -87,7 +87,7 @@
 
     public void testExceptionDuringLogin() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onLogin(FtpRequest request, FtpResponse response)
+            public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response)
                     throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
@@ -104,7 +104,7 @@
 
     public void testExceptionDuringDeleteStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -125,7 +125,7 @@
 
     public void testExceptionDuringDeleteEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -149,7 +149,7 @@
 
     public void testExceptionDuringMkdirStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -168,7 +168,7 @@
 
     public void testExceptionDuringMkdirEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -190,7 +190,7 @@
 
     public void testExceptionDuringRmdirStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -211,7 +211,7 @@
 
     public void testExceptionDuringRmdirEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -235,7 +235,7 @@
 
     public void testExceptionDuringSite() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -252,7 +252,7 @@
 
     public void testExceptionDuringRenameStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -274,7 +274,7 @@
     
     public void testExceptionDuringRenameEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -300,7 +300,7 @@
 
     public void testExceptionDuringDownloadStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -319,7 +319,7 @@
 
     public void testExceptionDuringDownloadEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -342,7 +342,7 @@
 
     public void testExceptionDuringAppendStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -363,7 +363,7 @@
     
     public void testExceptionDuringAppendEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -385,7 +385,7 @@
 
     public void testExceptionDuringUploadStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -404,7 +404,7 @@
     
     public void testExceptionDuringUploadEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -424,7 +424,7 @@
     
     public void testExceptionDuringUploadUniqueStart() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 return mockReturnValue;
             }
@@ -443,7 +443,7 @@
     
     public void testExceptionDuringUploadUniqueEnd() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 throwException();
                 
                 return mockReturnValue;

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java Tue Jan  2 08:17:22 2007
@@ -66,7 +66,7 @@
 
     public void testLogin() throws Exception {
         MockFtplet.callback = new MockFtpletCallback() {
-            public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+            public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
                 return FtpletEnum.RET_SKIP;
             }
         };

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtplet.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtplet.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtplet.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtplet.java Tue Jan  2 08:17:22 2007
@@ -33,84 +33,84 @@
         callback.init(ftpletContext, config);
     }
 
-    public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onAppendEnd(request, response);
+    public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onAppendEnd(session, request, response);
     }
 
-    public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onAppendStart(request, response);
+    public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onAppendStart(session, request, response);
     }
 
-    public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onConnect(request, response);
+    public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
+        return callback.onConnect(session, response);
     }
 
-    public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onDeleteEnd(request, response);
+    public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onDeleteEnd(session, request, response);
     }
 
-    public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onDeleteStart(request, response);
+    public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onDeleteStart(session, request, response);
     }
 
-    public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onDisconnect(request, response);
+    public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
+        return callback.onDisconnect(session, response);
     }
 
-    public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onDownloadEnd(request, response);
+    public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onDownloadEnd(session, request, response);
     }
 
-    public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onDownloadStart(request, response);
+    public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onDownloadStart(session, request, response);
     }
 
-    public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onLogin(request, response);
+    public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onLogin(session, request, response);
     }
 
-    public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onMkdirEnd(request, response);
+    public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onMkdirEnd(session, request, response);
     }
 
-    public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onMkdirStart(request, response);
+    public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onMkdirStart(session, request, response);
     }
 
-    public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onRenameEnd(request, response);
+    public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onRenameEnd(session, request, response);
     }
 
-    public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onRenameStart(request, response);
+    public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onRenameStart(session, request, response);
     }
 
-    public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onRmdirEnd(request, response);
+    public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onRmdirEnd(session, request, response);
     }
 
-    public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onRmdirStart(request, response);
+    public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onRmdirStart(session, request, response);
     }
 
-    public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onSite(request, response);
+    public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onSite(session, request, response);
     }
 
-    public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onUploadEnd(request, response);
+    public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onUploadEnd(session, request, response);
     }
 
-    public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onUploadStart(request, response);
+    public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onUploadStart(session, request, response);
     }
 
-    public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onUploadUniqueEnd(request, response);
+    public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onUploadUniqueEnd(session, request, response);
     }
 
-    public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
-        return callback.onUploadUniqueStart(request, response);
+    public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
+        return callback.onUploadUniqueStart(session, request, response);
     }
 }
 

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtpletCallback.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtpletCallback.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtpletCallback.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/ftplet/MockFtpletCallback.java Tue Jan  2 08:17:22 2007
@@ -31,83 +31,83 @@
     public void init(FtpletContext ftpletContext, Configuration config) throws FtpException {
     }
 
-    public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 
-    public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {
+    public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {
         return returnValue;
     }
 

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java Tue Jan  2 08:17:22 2007
@@ -21,11 +21,11 @@
 
 import java.util.Date;
 
-import org.apache.ftpserver.FtpStatisticsImpl;
-import org.apache.ftpserver.ftplet.FtpRequest;
-
 import junit.framework.TestCase;
 
+import org.apache.ftpserver.FtpStatisticsImpl;
+import org.apache.ftpserver.ftplet.FtpSession;
+
 public abstract class ServerFtpStatisticsTestTemplate extends TestCase {
 
     public static class MockConnection implements Connection {
@@ -33,7 +33,7 @@
         public void close() {
         }
 
-        public FtpRequest getRequest() {
+        public FtpSession getSession() {
             return null;
         }
 

Modified: incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/DefaultFtplet.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/DefaultFtplet.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/DefaultFtplet.java (original)
+++ incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/DefaultFtplet.java Tue Jan  2 08:17:22 2007
@@ -34,33 +34,33 @@
     public void init(FtpletContext ftpletContext, Configuration config) throws FtpException {}
     public void destroy() {}
     
-    public FtpletEnum onConnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onDisconnect(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onLogin(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onConnect(FtpSession session, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onDisconnect(FtpSession session, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onLogin(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onDeleteStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onDeleteEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onUploadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onUploadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onUploadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onDownloadStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onDownloadEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onRmdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onRmdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onMkdirStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onMkdirEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
         
-    public FtpletEnum onAppendStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onAppendEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onAppendStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onUploadUniqueStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onUploadUniqueEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onRenameStart(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
-    public FtpletEnum onRenameEnd(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onRenameStart(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
     
-    public FtpletEnum onSite(FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
+    public FtpletEnum onSite(FtpSession session, FtpRequest request, FtpResponse response) throws FtpException, IOException {return null;}
 }

Modified: incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/FtpRequest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/FtpRequest.java?view=diff&rev=491831&r1=491830&r2=491831
==============================================================================
--- incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/FtpRequest.java (original)
+++ incubator/ftpserver/trunk/ftplet-api/src/java/org/apache/ftpserver/ftplet/FtpRequest.java Tue Jan  2 08:17:22 2007
@@ -19,22 +19,11 @@
 
 package org.apache.ftpserver.ftplet;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.util.Date;
 
 /**
- * Defines an object to provide client request information to a ftplet.
- * Ftplet methods will always get the same instance of Ftplet request.
- * So the attributes set by <code>setAttribute()</code> will be always 
- * available later unless that attribute is removed.
- * 
- * @author <a href="mailto:rana_b@yahoo.com">Rana Bhattacharyya</a>
+ * One FtpRequest made by the client. 
  */
-public 
-interface FtpRequest {
+public interface FtpRequest {
 
     /**
      * Get the client request string.
@@ -52,105 +41,8 @@
     String getArgument();
     
     /**
-     * Returns the IP address of the client that sent the request.
+     * Check if request contains an argument
+     * @return true if an argument is available
      */
-    InetAddress getRemoteAddress();
-    
-    /**
-     * Get connection time.
-     */
-    Date getConnectionTime();
-    
-    /**
-     * Get the login time.
-     */
-    Date getLoginTime();
-    
-    /**
-     * Get last access time.
-     */
-    Date getLastAccessTime();
-
-    /**
-     * Returns maximum idle time. This time equals to
-     * {@link ConnectionManagerImpl#getDefaultIdleSec()} until user login, and
-     * {@link User#getMaxIdleTime()} after user login.
-     */
-    int getMaxIdleTime();
-    
-    /**
-     * Set maximum idle time in seconds. This time equals to
-     * {@link ConnectionManagerImpl#getDefaultIdleSec()} until user login, and
-     * {@link User#getMaxIdleTime()} after user login.
-     */
-    void setMaxIdleTime(int maxIdleTimeSec);
-
-    /**
-     * Get user object.
-     */
-    User getUser();
-
-    /**
-     * Returns user name entered in USER command
-     * 
-     * @return user name entered in USER command
-     */
-    String getUserArgument();
-    
-    /**
-     * Get the requested language.
-     */
-    String getLanguage();
-    
-    /**
-     * Is the user logged in?
-     */
-    boolean isLoggedIn();
-
-    /**
-     * Get user file system view.
-     */
-    FileSystemView getFileSystemView();
-    
-    /**
-     * Get file upload/download offset.
-     */
-    long getFileOffset();
-    
-    /**
-     * Get rename from file object.
-     */
-    FileObject getRenameFrom();
-    
-    /**
-     * Get data input stream.
-     */
-    InputStream getDataInputStream() throws IOException;
-    
-    /**
-     * Get data output stream.
-     */
-    OutputStream getDataOutputStream() throws IOException;
-    
-    /**
-     * Returns the value of the named attribute as an Object, 
-     * or null if no attribute of the given name exists.
-     */
-    Object getAttribute(String name);
-    
-    /**
-     * Stores an attribute in this request. It will be available 
-     * until it was removed or when the connection ends. 
-     */
-    void setAttribute(String name, Object value);
-    
-    /**
-     * Removes an attribute from this request.
-     */
-    void removeAttribute(String name);
-    
-    /**
-     * Clear all attributes
-     */
-    void clear();
+    boolean hasArgument();
 }



Mime
View raw message