directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r358236 - /directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java
Date Wed, 21 Dec 2005 09:12:54 GMT
Author: trustin
Date: Wed Dec 21 01:12:50 2005
New Revision: 358236

URL: http://svn.apache.org/viewcvs?rev=358236&view=rev
Log:
Removed all calls to IoFuture.join() in SSLFilter to make it run without ThreadPoolFilter

Modified:
    directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java

Modified: directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java?rev=358236&r1=358235&r2=358236&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java Wed Dec 21 01:12:50
2005
@@ -29,6 +29,7 @@
 import org.apache.mina.common.CloseFuture;
 import org.apache.mina.common.IoFilterAdapter;
 import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoFuture;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteFuture;
@@ -330,10 +331,9 @@
     public void onPreRemove( IoFilterChain parent, String name, NextFilter nextFilter ) throws
SSLException
     {
         IoSession session = parent.getSession();
-        WriteFuture future = stopSSL( session );
+        stopSSL( session );
         session.removeAttribute( NEXT_FILTER );
         session.removeAttribute( SSL_HANDLER );
-        future.join();
     }
 
     // IoFilter impl.
@@ -526,7 +526,7 @@
         }
     }
     
-    public void filterClose( NextFilter nextFilter, IoSession session, CloseFuture closeFuture
) throws SSLException
+    public void filterClose( final NextFilter nextFilter, final IoSession session, final
CloseFuture closeFuture ) throws SSLException
     {
         SSLHandler handler = getSSLSessionHandler( session );
 
@@ -542,13 +542,21 @@
             }
             finally
             {
-                nextFilter.filterClose( session, closeFuture );
+                if( future == null )
+                {
+                    nextFilter.filterClose( session, closeFuture );
+                }
+                else
+                {
+                    future.setCallback( new IoFuture.Callback()
+                    {
+                        public void operationComplete( IoFuture future )
+                        {
+                            nextFilter.filterClose( session, closeFuture );
+                        }
+                    });
+                }
             }
-        }
-        
-        if( future != null )
-        {
-            future.join();
         }
     }
     



Mime
View raw message