directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r330950 - /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Date Sat, 05 Nov 2005 01:25:51 GMT
Author: trustin
Date: Fri Nov  4 17:25:49 2005
New Revision: 330950

URL: http://svn.apache.org/viewcvs?rev=330950&view=rev
Log:
Fixed: Forgot to add codec filter

Modified:
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java?rev=330950&r1=330949&r2=330950&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Fri Nov  4 17:25:49 2005
@@ -61,9 +61,12 @@
 import org.apache.ldap.server.protocol.support.ModifyHandler;
 import org.apache.ldap.server.protocol.support.SearchHandler;
 import org.apache.ldap.server.protocol.support.UnbindHandler;
+import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
+import org.apache.mina.filter.LoggingFilter;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
+import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
 import org.apache.mina.handler.DemuxingIoHandler;
@@ -342,6 +345,13 @@
 
     private class LdapProtocolHandler extends DemuxingIoHandler
     {
+        public void sessionCreated( IoSession session ) throws Exception
+        {
+            IoFilterChain filters = session.getFilterChain();
+            filters.addLast( "logger", new LoggingFilter() );
+            filters.addLast( "codec", new ProtocolCodecFilter( codecFactory ) );
+        }
+        
         public void sessionClosed( IoSession session )
         {
             SessionRegistry.getSingleton().remove( session );



Mime
View raw message