incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r611112 - in /incubator/ftpserver/trunk/core/src: main/java/org/apache/ftpserver/ftplet/ main/java/org/apache/ftpserver/interfaces/ main/java/org/apache/ftpserver/listener/ test/java/org/apache/ftpserver/interfaces/
Date Fri, 11 Jan 2008 09:00:26 GMT
Author: ngn
Date: Fri Jan 11 01:00:24 2008
New Revision: 611112

URL: http://svn.apache.org/viewvc?rev=611112&view=rev
Log:
Cleaning up some cruft remaining from the old listener implementation, more remaining

Removed:
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/IsolatingFtpSession.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/FtpServerSession.java
Modified:
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/AbstractConnection.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/Connection.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java?rev=611112&r1=611111&r2=611112&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java
(original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/DefaultFtpletContainer.java
Fri Jan 11 01:00:24 2008
@@ -120,13 +120,11 @@
      * Call ftplet onConnect.
      */
     public FtpletEnum onConnect(FtpSession session) throws FtpException, IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession);
+            retVal = ftpletEnt.ftplet.onConnect(session);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -143,13 +141,11 @@
      * Call ftplet onDisconnect.
      */
     public FtpletEnum onDisconnect(FtpSession session) throws FtpException, IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession);
+            retVal = ftpletEnt.ftplet.onDisconnect(session);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -166,13 +162,11 @@
      * Call ftplet onLogin.
      */
     public FtpletEnum onLogin(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onLogin(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -189,13 +183,11 @@
      * Call ftplet onDeleteStart.
      */
     public FtpletEnum onDeleteStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onDeleteStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -213,13 +205,11 @@
      * Call ftplet onDeleteEnd.
      */
     public FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onDeleteEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -236,13 +226,11 @@
      * Call ftplet onUploadStart.
      */
     public FtpletEnum onUploadStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onUploadStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -259,13 +247,11 @@
      * Call ftplet onUploadEnd.
      */
     public FtpletEnum onUploadEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onUploadEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -282,13 +268,11 @@
      * Call ftplet onDownloadStart.
      */
     public FtpletEnum onDownloadStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onDownloadStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -305,13 +289,11 @@
      * Call ftplet onDownloadEnd.
      */
     public FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onDownloadEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -328,13 +310,11 @@
      * Call ftplet onRmdirStart.
      */
     public FtpletEnum onRmdirStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onRmdirStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -351,13 +331,11 @@
      * Call ftplet onRmdirEnd.
      */
     public FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onRmdirEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -374,13 +352,11 @@
      * Call ftplet onMkdirStart.
      */
     public FtpletEnum onMkdirStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onMkdirStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -397,13 +373,11 @@
      * Call ftplet onMkdirEnd.
      */
     public FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onMkdirEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -420,13 +394,11 @@
      * Call ftplet onAppendStart.
      */
     public FtpletEnum onAppendStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onAppendStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -443,13 +415,11 @@
      * Call ftplet onAppendEnd.
      */
     public FtpletEnum onAppendEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onAppendEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -466,13 +436,11 @@
      * Call ftplet onUploadUniqueStart.
      */
     public FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request) throws
FtpException, IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onUploadUniqueStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -489,13 +457,11 @@
      * Call ftplet onUploadUniqueEnd.
      */
     public FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onUploadUniqueEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -512,13 +478,11 @@
      * Call ftplet onRenameStart.
      */
     public FtpletEnum onRenameStart(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onRenameStart(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -535,13 +499,11 @@
      * Call ftplet onRenameEnd.
      */
     public FtpletEnum onRenameEnd(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onRenameEnd(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }
@@ -558,13 +520,11 @@
      * Call ftplet onSite.
      */
     public FtpletEnum onSite(FtpSession session, FtpRequest request) throws FtpException,
IOException {
-        FtpSession isolatedSession = new IsolatingFtpSession(session);
-        
         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(isolatedSession, request);
+            retVal = ftpletEnt.ftplet.onSite(session, request);
             if(retVal == null) {
                 retVal = FtpletEnum.RET_DEFAULT;
             }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/AbstractConnection.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/AbstractConnection.java?rev=611112&r1=611111&r2=611112&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/AbstractConnection.java
(original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/AbstractConnection.java
Fri Jan 11 01:00:24 2008
@@ -81,7 +81,7 @@
      * Notify connection manager observer.
      */
     protected void notifyObserver() {
-        // replace with MINA idle handling
+        // TODO replace with MINA idle handling
     	//ftpSession.updateLastAccessTime();
         serverContext.getConnectionManager().updateConnection(this);
     }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/Connection.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/Connection.java?rev=611112&r1=611111&r2=611112&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/Connection.java
(original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/Connection.java
Fri Jan 11 01:00:24 2008
@@ -21,7 +21,6 @@
 
 import org.apache.ftpserver.ftplet.FtpSession;
 import org.apache.ftpserver.interfaces.FtpServerContext;
-import org.apache.ftpserver.interfaces.FtpServerSession;
 
 /**
  * This is the connection request handler interface.
@@ -50,13 +49,5 @@
      */
     FtpServerContext getServerContext();
 
-    /**
-     * Secure the control socket
-     * @param type The type of security to use, i.e. SSL or TLS
-     * @throws Exception
-     */
-    void beforeSecureControlChannel(FtpServerSession session, String type) throws Exception;
-
-    void afterSecureControlChannel(FtpServerSession session, String type) throws Exception;
 }
  

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java?rev=611112&r1=611111&r2=611112&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
(original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
Fri Jan 11 01:00:24 2008
@@ -49,10 +49,6 @@
         public void run() {            
         }
 
-        public void beforeSecureControlChannel(FtpServerSession session, String type) throws
Exception {
-            
-        }
-
         public Socket getControlSocket() {
             return null;
         }
@@ -64,11 +60,6 @@
         public long transfer(InputStream bis, OutputStream bos, int maxRate) throws IOException
{
             return 0;
         }
-
-        public void afterSecureControlChannel(FtpServerSession session, String type) throws
Exception {
-            
-        }
-        
     }
     
     public void testConnectionCount() {



Mime
View raw message