directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r329802 - /directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java
Date Mon, 31 Oct 2005 11:47:51 GMT
Author: trustin
Date: Mon Oct 31 03:47:43 2005
New Revision: 329802

URL: http://svn.apache.org/viewcvs?rev=329802&view=rev
Log:
SSLFilter.SESSION_(UN)SECURED message has its own type now.

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=329802&r1=329801&r2=329802&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 Mon Oct 31 03:47:43
2005
@@ -107,14 +107,14 @@
      * event when the session is secured and its {@link #USE_NOTIFICATION}
      * attribute is set.
      */
-    public static final Object SESSION_SECURED = "SESSION_SECURED";
+    public static final SSLFilterMessage SESSION_SECURED = new SSLFilterMessage( "SESSION_SECURED"
);
     
     /**
      * A special message object which is emitted with a {@link IoHandler#messageReceived(IoSession,
Object)}
      * event when the session is not secure anymore and its {@link #USE_NOTIFICATION}
      * attribute is set.
      */
-    public static final Object SESSION_UNSECURED = "SESSION_UNSECURED";
+    public static final SSLFilterMessage SESSION_UNSECURED = new SSLFilterMessage( "SESSION_UNSECURED"
);
     
     private static final String SSL_HANDLER = SSLFilter.class.getName() + ".SSLHandler";
     
@@ -697,6 +697,28 @@
         {
             // release resources
             sslHandler.release();
+        }
+    }
+    
+    /**
+     * A message that is sent from {@link SSLFilter} when the connection became
+     * secure or is not secure anymore. 
+     *
+     * @author The Apache Directory Project (dev@directory.apache.org)
+     * @version $Rev$, $Date$
+     */
+    public static class SSLFilterMessage
+    {
+        private final String name;
+        
+        private SSLFilterMessage( String name )
+        {
+            this.name = name;
+        }
+        
+        public String toString()
+        {
+            return name;
         }
     }
     



Mime
View raw message