directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r519704 - /directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/
Date Sun, 18 Mar 2007 21:40:32 GMT
Author: erodriguez
Date: Sun Mar 18 14:40:31 2007
New Revision: 519704

URL: http://svn.apache.org/viewvc?view=rev&rev=519704
Log:
Removed handlers' dependency on StartupConfiguration in preparation for moving LDAP protocol
provider to LdapConfiguration:
o  Changed handlers to implement MINA MessageHandler.
o  Removed do-nothing init() methods.

Removed:
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/LdapMessageHandler.java
Modified:
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
    directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
Sun Mar 18 14:40:31 2007
@@ -20,13 +20,12 @@
 package org.apache.directory.server.ldap.support;
 
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.message.AbandonRequest;
 import org.apache.directory.shared.ldap.message.AbandonableRequest;
 import org.apache.directory.shared.ldap.message.Request;
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,7 +36,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class AbandonHandler implements LdapMessageHandler
+public class AbandonHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( AbandonHandler.class );
 
@@ -88,10 +87,5 @@
                 log.debug( "Abandoned request: " + req );
             }
         }
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
Sun Mar 18 14:40:31 2007
@@ -25,7 +25,6 @@
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.AddRequest;
@@ -36,9 +35,8 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,7 +47,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class AddHandler implements LdapMessageHandler
+public class AddHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( AddHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
@@ -133,10 +131,5 @@
 
         result.setResultCode( ResultCodeEnum.SUCCESS );
         session.write( req.getResultResponse() );
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
Sun Mar 18 14:40:31 2007
@@ -20,10 +20,10 @@
 package org.apache.directory.server.ldap.support;
 
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.support.bind.BindHandlerChain;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
+import org.apache.mina.handler.demux.MessageHandler;
 
 
 /**
@@ -34,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class BindHandler implements LdapMessageHandler
+public class BindHandler implements MessageHandler
 {
     private IoHandlerCommand bindHandler;
 
@@ -51,10 +51,5 @@
     public void messageReceived( IoSession session, Object message ) throws Exception
     {
         bindHandler.execute( null, session, message );
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
Sun Mar 18 14:40:31 2007
@@ -25,7 +25,6 @@
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.exception.LdapException;
@@ -37,9 +36,8 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,7 +48,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class CompareHandler implements LdapMessageHandler
+public class CompareHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( CompareHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
@@ -146,10 +144,5 @@
 
         result.setMatchedDn( req.getName() );
         session.write( req.getResultResponse() );
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
Sun Mar 18 14:40:31 2007
@@ -25,7 +25,6 @@
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.Control;
@@ -36,9 +35,8 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,7 +47,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DeleteHandler implements LdapMessageHandler
+public class DeleteHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( DeleteHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
@@ -126,10 +124,5 @@
 
         result.setResultCode( ResultCodeEnum.SUCCESS );
         session.write( req.getResultResponse() );
-    }
-    
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
Sun Mar 18 14:40:31 2007
@@ -24,7 +24,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.message.ExtendedRequest;
@@ -32,8 +31,8 @@
 import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
+import org.apache.mina.handler.demux.MessageHandler;
 
 
 /**
@@ -42,7 +41,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ExtendedHandler implements LdapMessageHandler
+public class ExtendedHandler implements MessageHandler
 {
     private Map handlers = new HashMap();
 
@@ -109,10 +108,5 @@
                 session.write( req.getResultResponse() );
             } 
         }
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
Sun Mar 18 14:40:31 2007
@@ -25,7 +25,6 @@
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.Control;
@@ -36,9 +35,8 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,7 +47,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ModifyDnHandler implements LdapMessageHandler
+public class ModifyDnHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( ModifyDnHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
@@ -190,10 +188,5 @@
             result.setResultCode( ResultCodeEnum.SUCCESS );
             session.write( req.getResultResponse() );
         }
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
Sun Mar 18 14:40:31 2007
@@ -25,7 +25,6 @@
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.SessionRegistry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.Control;
@@ -37,9 +36,8 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,7 +48,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ModifyHandler implements LdapMessageHandler
+public class ModifyHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( ModifyHandler.class );
     private static final ModificationItemImpl[] EMPTY = new ModificationItemImpl[0];
@@ -131,10 +129,5 @@
         result.setResultCode( ResultCodeEnum.SUCCESS );
         session.write( req.getResultResponse() );
         return;
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java?view=diff&rev=519704&r1=519703&r2=519704
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
Sun Mar 18 14:40:31 2007
@@ -23,12 +23,10 @@
 import javax.naming.NamingException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.ldap.SessionRegistry;
-
 import org.apache.mina.common.IoSession;
-
+import org.apache.mina.handler.demux.MessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -40,7 +38,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class UnbindHandler implements LdapMessageHandler
+public class UnbindHandler implements MessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( UnbindHandler.class );
 
@@ -68,10 +66,5 @@
         {
             log.error( "failed to unbind session properly", e );
         }
-    }
-
-
-    public void init( StartupConfiguration cfg )
-    {
     }
 }



Mime
View raw message