directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r350150 - /directory/network/branches/chain_refactor/src/java/org/apache/mina/filter/SSLFilter.java
Date Thu, 01 Dec 2005 04:15:29 GMT
Author: trustin
Date: Wed Nov 30 20:15:25 2005
New Revision: 350150

URL: http://svn.apache.org/viewcvs?rev=350150&view=rev
Log:
Fixed SSLFilter not to throw an IllegalStateException

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

Modified: directory/network/branches/chain_refactor/src/java/org/apache/mina/filter/SSLFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/chain_refactor/src/java/org/apache/mina/filter/SSLFilter.java?rev=350150&r1=350149&r2=350150&view=diff
==============================================================================
--- directory/network/branches/chain_refactor/src/java/org/apache/mina/filter/SSLFilter.java
(original)
+++ directory/network/branches/chain_refactor/src/java/org/apache/mina/filter/SSLFilter.java
Wed Nov 30 20:15:25 2005
@@ -330,13 +330,16 @@
         this.enabledProtocols = protocols;
     }
     
-    public void onPostAdd( IoFilterChain parent, String name, NextFilter nextFilter ) throws
SSLException
+    public void onPreAdd( IoFilterChain parent, String name, NextFilter nextFilter ) throws
SSLException
     {
         if( parent.contains( SSLFilter.class ) )
         {
             throw new IllegalStateException( "A filter chain cannot contain more than one
SSLFilter." );
         }
-
+    }
+    
+    public void onPostAdd( IoFilterChain parent, String name, NextFilter nextFilter ) throws
SSLException
+    {
         parent.getSession().setAttribute( NEXT_FILTER, nextFilter );
         Object managerOrSession = parent.getSession();
         if( managerOrSession instanceof IoSession )
@@ -345,8 +348,9 @@
         }
     }
     
-    public void onPostRemove( IoFilterChain parent, String name, NextFilter nextFilter )
+    public void onPreRemove( IoFilterChain parent, String name, NextFilter nextFilter ) throws
SSLException
     {
+        stopSSL( parent.getSession() ).join();
     }
 
     // IoFilter impl.



Mime
View raw message