directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987611 [9/13] - in /directory/apacheds/trunk: ./ all/ core-annotations/ core-api/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/event/ core-api/src/main/java/org/apache/dir...
Date Fri, 20 Aug 2010 19:32:02 GMT
Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java Fri Aug 20 19:31:58 2010
@@ -30,10 +30,8 @@ import javax.naming.directory.InitialDir
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.annotations.ContextEntry;
@@ -44,6 +42,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.Response;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -57,32 +57,12 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-@CreateDS( 
-    name = "ClientApiPerfTestDS",
-    partitions =
-    {
-        @CreatePartition(
-            name = "example",
-            suffix = "dc=example,dc=com",
-            contextEntry = @ContextEntry( 
-                entryLdif =
-                    "dn: dc=example,dc=com\n" +
-                    "dc: example\n" +
-                    "objectClass: top\n" +
-                    "objectClass: domain\n\n" ),
-            indexes = 
-            {
-                @CreateIndex( attribute = "objectClass" ),
-                @CreateIndex( attribute = "dc" ),
-                @CreateIndex( attribute = "ou" )
-            } )
-    } )
-@CreateLdapServer ( 
-    transports = 
-    {
-        @CreateTransport( protocol = "LDAP" ), 
-        @CreateTransport( protocol = "LDAPS" ) 
-    })
+@CreateDS(name = "ClientApiPerfTestDS", partitions =
+    { @CreatePartition(name = "example", suffix = "dc=example,dc=com", contextEntry = @ContextEntry(entryLdif = "dn: dc=example,dc=com\n"
+        + "dc: example\n" + "objectClass: top\n" + "objectClass: domain\n\n"), indexes =
+        { @CreateIndex(attribute = "objectClass"), @CreateIndex(attribute = "dc"), @CreateIndex(attribute = "ou") }) })
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
 public class TestClientApiPerf extends AbstractLdapTestUnit
 {
 
@@ -97,11 +77,10 @@ public class TestClientApiPerf extends A
 
         long t2 = System.currentTimeMillis();
 
-        Cursor<SearchResponse> cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE,
-            "*" );
+        Cursor<Response> cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE, "*" );
         while ( cursor.next() )
         {
-            SearchResponse sr = cursor.get();
+            Response sr = cursor.get();
             SearchResultEntry sre = ( SearchResultEntry ) sr;
         }
 

Propchange: directory/apacheds/trunk/ldif-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/ldif-partition:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/ldif-partition:980138-980936
-/directory/apacheds/trunk/ldif-partition:980025-980137

Propchange: directory/apacheds/trunk/protocol-changepw/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/protocol-changepw:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-changepw:980138-980936
-/directory/apacheds/trunk/protocol-changepw:980025-980137

Propchange: directory/apacheds/trunk/protocol-dhcp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/protocol-dhcp:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dhcp:980138-980936
-/directory/apacheds/trunk/protocol-dhcp:980025-980137

Propchange: directory/apacheds/trunk/protocol-dns/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/protocol-dns:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dns:980138-980936
-/directory/apacheds/trunk/protocol-dns:980025-980137

Propchange: directory/apacheds/trunk/protocol-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/protocol-kerberos:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-kerberos:980138-980936
-/directory/apacheds/trunk/protocol-kerberos:980025-980137

Propchange: directory/apacheds/trunk/protocol-ldap/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:31:58 2010
@@ -1,2 +1,2 @@
+/directory/apacheds/branches/apacheds-codec-merge/protocol-ldap:982369-987590
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap:980138-980936
-/directory/apacheds/trunk/protocol-ldap:980025-980137

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java Fri Aug 20 19:31:58 2010
@@ -22,7 +22,7 @@ package org.apache.directory.server.ldap
 
 import java.util.Set;
 
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
 
 
 /**
@@ -58,7 +58,7 @@ public interface ExtendedOperationHandle
      * 
      * @throws Exception if failed to handle the operation
      */
-    void handleExtendedOperation( LdapSession session, InternalExtendedRequest req ) throws Exception;
+    void handleExtendedOperation( LdapSession session, ExtendedRequest req ) throws Exception;
 
 
     /**

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java Fri Aug 20 19:31:58 2010
@@ -22,9 +22,8 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.shared.asn1.codec.Asn1CodecDecoder;
-import org.apache.directory.shared.asn1.codec.Asn1CodecEncoder;
+import org.apache.directory.shared.ldap.message.LdapProtocolEncoder;
 import org.apache.directory.shared.ldap.message.MessageDecoder;
-import org.apache.directory.shared.ldap.message.MessageEncoder;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -44,9 +43,9 @@ final class LdapProtocolCodecFactory imp
 {
     /** the directory service for which this factor generates codecs */
     final private DirectoryService directoryService;
-    
+
     /** The tag stored into the session if we want to set a max PDU size */
-    public final static String MAX_PDU_SIZE = "MAX_PDU_SIZE"; 
+    public final static String MAX_PDU_SIZE = "MAX_PDU_SIZE";
 
 
     /**
@@ -61,19 +60,17 @@ final class LdapProtocolCodecFactory imp
     }
 
 
-    /*
-     * (non-Javadoc)
-     * @see org.apache.mina.filter.codec.ProtocolCodecFactory#getEncoder()
+    /**
+     * {@inheritDoc}
      */
     public ProtocolEncoder getEncoder( IoSession session )
     {
-        return new Asn1CodecEncoder( new MessageEncoder() );
+        return new LdapProtocolEncoder();
     }
 
 
-    /*
-     * (non-Javadoc)
-     * @see org.apache.mina.filter.codec.ProtocolCodecFactory#getDecoder()
+    /**
+     * {@inheritDoc}
      */
     public ProtocolDecoder getDecoder( IoSession session )
     {
@@ -82,11 +79,11 @@ final class LdapProtocolCodecFactory imp
             public boolean isBinary( String id )
             {
                 SchemaManager schemaManager = directoryService.getSchemaManager();
-                
+
                 try
                 {
                     AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
-                    return ! type.getSyntax().isHumanReadable();
+                    return !type.getSyntax().isHumanReadable();
                 }
                 catch ( Exception e )
                 {
@@ -94,11 +91,10 @@ final class LdapProtocolCodecFactory imp
                     {
                         return false;
                     }
-                    
+
                     return id.endsWith( ";binary" );
                 }
             }
-        },
-        directoryService.getMaxPDUSize() ) );
+        }, directoryService.getMaxPDUSize() ) );
     }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java Fri Aug 20 19:31:58 2010
@@ -20,15 +20,15 @@
 package org.apache.directory.server.ldap;
 
 
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.message.ExtendedRequestImpl;
+import org.apache.directory.shared.ldap.message.Request;
 import org.apache.directory.shared.ldap.message.ResponseCarryingMessageException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.ResultResponseRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
 import org.apache.mina.core.service.IoHandler;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.ssl.SslFilter;
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  * The MINA IoHandler implementation extending {@link DemuxingIoHandler} for 
  * the LDAP protocol.  THe {@link LdapServer} creates this multiplexing 
  * {@link IoHandler} handler and populates it with subordinate handlers for
- * the various kinds of LDAP {@link InternalRequest} messages.  This is done in the
+ * the various kinds of LDAP {@link Request} messages.  This is done in the
  * setXxxHandler() methods of the LdapServer where Xxxx is Add, Modify, etc.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -50,7 +50,7 @@ class LdapProtocolHandler extends Demuxi
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( LdapProtocolHandler.class );
-    
+
     /** the {@link LdapServer} this handler is associated with */
     private final LdapServer ldapServer;
 
@@ -87,12 +87,12 @@ class LdapProtocolHandler extends Demuxi
     {
         // Get the associated LdapSession
         LdapSession ldapSession = ldapServer.getLdapSessionManager().removeLdapSession( session );
-        
+
         // Clean it up !
         cleanUpSession( ldapSession );
     }
 
-    
+
     /**
      * Explicitly handles {@link LdapSession} and {@link IoSession} cleanup tasks.
      *
@@ -106,16 +106,16 @@ class LdapProtocolHandler extends Demuxi
             LOG.warn( "Null LdapSession given to cleanUpSession." );
             return;
         }
-        
+
         LOG.debug( "Cleaning the {} session", ldapSession );
-        
+
         if ( ldapSession != null )
         {
             // Abandon all the requests
             ldapSession.abandonAllOutstandingRequests();
         }
-        
-        if ( ! ldapSession.getIoSession().isClosing() || ldapSession.getIoSession().isConnected() )
+
+        if ( !ldapSession.getIoSession().isClosing() || ldapSession.getIoSession().isConnected() )
         {
             try
             {
@@ -128,7 +128,7 @@ class LdapProtocolHandler extends Demuxi
         }
     }
 
-    
+
     /*
      * (non-Javadoc)
      * @see org.apache.mina.handler.demux.DemuxingIoHandler#messageReceived(org.apache.mina.common.IoSession, java.lang.Object)
@@ -159,28 +159,29 @@ class LdapProtocolHandler extends Demuxi
 
         if ( message == SslFilter.SESSION_SECURED )
         {
-            InternalExtendedRequest req = new ExtendedRequestImpl( 0 );
-            req.setOid( "1.3.6.1.4.1.1466.20037" );
-            req.setPayload( "SECURED".getBytes( "ISO-8859-1" ) );
+            ExtendedRequest req = new ExtendedRequestImpl( 0 );
+            req.setRequestName( "1.3.6.1.4.1.1466.20037" );
+            req.setRequestValue( "SECURED".getBytes( "ISO-8859-1" ) );
             message = req;
         }
         else if ( message == SslFilter.SESSION_UNSECURED )
         {
-            InternalExtendedRequest req = new ExtendedRequestImpl( 0 );
-            req.setOid( "1.3.6.1.4.1.1466.20037" );
-            req.setPayload( "UNSECURED".getBytes( "ISO-8859-1" ) );
+            ExtendedRequest req = new ExtendedRequestImpl( 0 );
+            req.setRequestName( "1.3.6.1.4.1.1466.20037" );
+            req.setRequestValue( "UNSECURED".getBytes( "ISO-8859-1" ) );
             message = req;
         }
 
-        if ( ( ( InternalRequest ) message ).getControls().size() > 0 && message instanceof InternalResultResponseRequest )
+        if ( ( ( Request ) message ).getControls().size() > 0
+            && message instanceof ResultResponseRequest )
         {
-            InternalResultResponseRequest req = ( InternalResultResponseRequest ) message;
-            
+            ResultResponseRequest req = ( ResultResponseRequest ) message;
+
             for ( Control control : req.getControls().values() )
             {
-                if ( control.isCritical() && ! ldapServer.getSupportedControls().contains( control.getOid() ) )
+                if ( control.isCritical() && !ldapServer.getSupportedControls().contains( control.getOid() ) )
                 {
-                    InternalResultResponse resp = req.getResultResponse();
+                    ResultResponse resp = req.getResultResponse();
                     resp.getLdapResult().setErrorMessage( "Unsupport critical control: " + control.getOid() );
                     resp.getLdapResult().setResultCode( ResultCodeEnum.UNAVAILABLE_CRITICAL_EXTENSION );
                     session.write( resp );
@@ -207,9 +208,9 @@ class LdapProtocolHandler extends Demuxi
             {
                 session.write( rcme.getResponse() );
                 return;
-            }                
+            }
         }
-        
+
         LOG.warn( "Unexpected exception forcing session to close: sending disconnect notice to client.", cause );
 
         session.write( NoticeOfDisconnect.PROTOCOLERROR );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java Fri Aug 20 19:31:58 2010
@@ -21,8 +21,8 @@ package org.apache.directory.server.ldap
 
 
 import org.apache.directory.server.core.interceptor.context.OperationContext;
-import org.apache.directory.shared.ldap.message.internal.InternalRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResponse;
+import org.apache.directory.shared.ldap.message.Request;
+import org.apache.directory.shared.ldap.message.Response;
 
 
 /**
@@ -39,11 +39,11 @@ public class LdapProtocolUtils implement
      * @param opContext the context to populate with request controls
      * @param request the request to extract controls from
      */
-    public static void setRequestControls( OperationContext opContext, InternalRequest request ) throws Exception
+    public static void setRequestControls( OperationContext opContext, Request request ) throws Exception
     {
         if ( request.getControls() != null )
         {
-            request.addAll( request.getControls().values().toArray( EMPTY_CONTROLS ) );
+            request.addAllControls( request.getControls().values().toArray( EMPTY_CONTROLS ) );
         }
     }
 
@@ -55,7 +55,7 @@ public class LdapProtocolUtils implement
      * @param opContext the context to extract controls from
      * @param response the response to populate with response controls
      */
-    public static void setResponseControls( OperationContext opContext, InternalResponse response ) throws Exception
+    public static void setResponseControls( OperationContext opContext, Response response ) throws Exception
     {
         opContext.addRequestControls( opContext.getResponseControls() );
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Fri Aug 20 19:31:58 2010
@@ -72,17 +72,17 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControl;
 import org.apache.directory.shared.ldap.constants.SaslQoP;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalCompareRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.filterchain.IoFilterChainBuilder;
@@ -122,7 +122,7 @@ public class LdapServer extends Director
 
     /** the constant service name of this ldap protocol provider **/
     public static final String SERVICE_NAME = "ldap";
-    
+
     /** The default maximum size limit. */
     private static final long MAX_SIZE_LIMIT_DEFAULT = 100;
 
@@ -137,7 +137,7 @@ public class LdapServer extends Director
 
     /** the session manager for this LdapServer */
     private LdapSessionManager ldapSessionManager = new LdapSessionManager();
-    
+
     /** a set of supported controls */
     private Set<String> supportedControls;
 
@@ -145,17 +145,17 @@ public class LdapServer extends Director
      * The maximum size limit. 
      * @see {@link LdapServer#MAX_SIZE_LIMIT_DEFAULT }
      */
-    private long maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; 
+    private long maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT;
 
     /** 
      * The maximum time limit.
      * @see {@link LdapServer#MAX_TIME_LIMIT_DEFAULT }
      */
-    private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; 
+    private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT;
 
     /** If LDAPS is activated : the external Keystore file, if defined */
     private String keystoreFile;
-    
+
     /** If LDAPS is activated : the certificate password */
     private String certificatePassword;
 
@@ -163,12 +163,10 @@ public class LdapServer extends Director
     private boolean allowAnonymousAccess = true;
 
     /** The extended operation handlers. */
-    private final Collection<ExtendedOperationHandler> extendedOperationHandlers =
-        new ArrayList<ExtendedOperationHandler>();
+    private final Collection<ExtendedOperationHandler> extendedOperationHandlers = new ArrayList<ExtendedOperationHandler>();
 
     /** The supported authentication mechanisms. */
-    private Map<String, MechanismHandler> saslMechanismHandlers =
-        new HashMap<String, MechanismHandler>();
+    private Map<String, MechanismHandler> saslMechanismHandlers = new HashMap<String, MechanismHandler>();
 
     /** The name of this host, validated during SASL negotiation. */
     private String saslHost = "ldap.example.com";
@@ -178,29 +176,28 @@ public class LdapServer extends Director
 
     /** The quality of protection (QoP), used by DIGEST-MD5 and GSSAPI. */
     private Set<String> saslQop;
-    private String      saslQopString;
+    private String saslQopString;
 
     /** The list of realms serviced by this host. */
     private List<String> saslRealms;
 
     /** The protocol handlers */
-    private LdapRequestHandler<InternalAbandonRequest> abandonHandler;
-    private LdapRequestHandler<InternalAddRequest> addHandler;
-    private LdapRequestHandler<InternalBindRequest> bindHandler;
-    private LdapRequestHandler<InternalCompareRequest> compareHandler;
-    private LdapRequestHandler<InternalDeleteRequest> deleteHandler;
-    private LdapRequestHandler<InternalExtendedRequest> extendedHandler;
-    private LdapRequestHandler<InternalModifyRequest> modifyHandler;
-    private LdapRequestHandler<InternalModifyDnRequest> modifyDnHandler;
-    private LdapRequestHandler<InternalSearchRequest> searchHandler;
-    private LdapRequestHandler<InternalUnbindRequest> unbindHandler;
-
+    private LdapRequestHandler<AbandonRequest> abandonHandler;
+    private LdapRequestHandler<AddRequest> addHandler;
+    private LdapRequestHandler<BindRequest> bindHandler;
+    private LdapRequestHandler<CompareRequest> compareHandler;
+    private LdapRequestHandler<DeleteRequest> deleteHandler;
+    private LdapRequestHandler<ExtendedRequest> extendedHandler;
+    private LdapRequestHandler<ModifyRequest> modifyHandler;
+    private LdapRequestHandler<ModifyDnRequest> modifyDnHandler;
+    private LdapRequestHandler<SearchRequest> searchHandler;
+    private LdapRequestHandler<UnbindRequest> unbindHandler;
 
     /** the underlying provider codec factory */
     private ProtocolCodecFactory codecFactory;
 
     /** the MINA protocol handler */
-    private final LdapProtocolHandler handler = new LdapProtocolHandler(this);
+    private final LdapProtocolHandler handler = new LdapProtocolHandler( this );
 
     /** tracks start state of the server */
     private boolean started;
@@ -211,17 +208,17 @@ public class LdapServer extends Director
      */
     private boolean confidentialityRequired;
 
-    
     private KeyStore keyStore = null;
 
     private List<IoFilterChainBuilder> chainBuilders = new ArrayList<IoFilterChainBuilder>();
-    
+
     private ReplicationProvider replicationProvider;
-    
+
     private List<SyncreplConfiguration> providerConfigs;
-    
+
     private List<SyncReplConsumer> replConsumers;
-    
+
+
     /**
      * Creates an LDAP protocol provider.
      */
@@ -264,56 +261,55 @@ public class LdapServer extends Director
         {
             setAbandonHandler( new AbandonHandler() );
         }
-        
+
         if ( getAddHandler() == null )
         {
             setAddHandler( new AddHandler() );
         }
-        
+
         if ( getBindHandler() == null )
         {
             BindHandler handler = new BindHandler();
             handler.setSaslMechanismHandlers( saslMechanismHandlers );
             setBindHandler( handler );
         }
-        
+
         if ( getCompareHandler() == null )
         {
             setCompareHandler( new CompareHandler() );
         }
-        
+
         if ( getDeleteHandler() == null )
         {
             setDeleteHandler( new DeleteHandler() );
         }
-        
+
         if ( getExtendedHandler() == null )
         {
             setExtendedHandler( new ExtendedHandler() );
         }
-        
+
         if ( getModifyHandler() == null )
         {
             setModifyHandler( new ModifyHandler() );
         }
-        
+
         if ( getModifyDnHandler() == null )
         {
             setModifyDnHandler( new ModifyDnHandler() );
         }
-        
+
         if ( getSearchHandler() == null )
         {
             setSearchHandler( new SearchHandler() );
         }
-        
+
         if ( getUnbindHandler() == null )
         {
             setUnbindHandler( new UnbindHandler() );
         }
     }
 
-    
     private class AdsKeyStore extends KeyStore
     {
         public AdsKeyStore( KeyStoreSpi keyStoreSpi, Provider provider, String type )
@@ -322,7 +318,7 @@ public class LdapServer extends Director
         }
     }
 
-    
+
     /**
      * loads the digital certificate either from a keystore file or from the admin entry in DIT
      */
@@ -335,8 +331,10 @@ public class LdapServer extends Director
             Provider provider = Security.getProvider( "SUN" );
             LOG.debug( "provider = {}", provider );
             CoreKeyStoreSpi coreKeyStoreSpi = new CoreKeyStoreSpi( getDirectoryService() );
-            keyStore = new KeyStore( coreKeyStoreSpi, provider, "JKS" ) {};
-            
+            keyStore = new KeyStore( coreKeyStoreSpi, provider, "JKS" )
+            {
+            };
+
             try
             {
                 keyStore.load( null, null );
@@ -352,7 +350,7 @@ public class LdapServer extends Director
             FileInputStream fis = null;
             try
             {
-                fis = new FileInputStream( keystoreFile );          
+                fis = new FileInputStream( keystoreFile );
                 keyStore.load( fis, null );
             }
             finally
@@ -365,7 +363,7 @@ public class LdapServer extends Director
         }
     }
 
-    
+
     /**
      * reloads the SSL context by replacing the existing SslFilter
      * with a new SslFilter after reloading the keystore.
@@ -374,7 +372,7 @@ public class LdapServer extends Director
      */
     public void reloadSslContext() throws Exception
     {
-        if( !started )
+        if ( !started )
         {
             return;
         }
@@ -397,7 +395,7 @@ public class LdapServer extends Director
         }
 
         StartTlsHandler handler = ( StartTlsHandler ) getExtendedOperationHandler( StartTlsHandler.EXTENSION_OID );
-        if( handler != null )
+        if ( handler != null )
         {
             //FIXME dirty hack. IMO StartTlsHandler's code requires a cleanup
             // cause the keystore loading and sslcontext creation code is duplicated
@@ -408,28 +406,28 @@ public class LdapServer extends Director
         LOG.info( "reloaded SSL context successfully" );
     }
 
-    
+
     /**
      * @throws IOException if we cannot bind to the specified port
      * @throws Exception if the LDAP server cannot be started
      */
     public void start() throws Exception
     {
-        if ( ! isEnabled() )
+        if ( !isEnabled() )
         {
             return;
         }
 
-        for ( Transport transport:transports )
+        for ( Transport transport : transports )
         {
-            if ( !(transport instanceof TcpTransport ) )
+            if ( !( transport instanceof TcpTransport ) )
             {
                 LOG.warn( "Cannot listen on an UDP transport : {}", transport );
                 continue;
             }
-            
+
             IoFilterChainBuilder chain;
-            
+
             if ( transport.isSSLEnabled() )
             {
                 loadKeyStore();
@@ -439,39 +437,37 @@ public class LdapServer extends Director
             {
                 chain = new DefaultIoFilterChainBuilder();
             }
-            
+
             // Inject the codec into the chain
-            ((DefaultIoFilterChainBuilder)chain).addLast( "codec", 
-                    new ProtocolCodecFilter( this.getProtocolCodecFactory() ) );
-            
+            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "codec", new ProtocolCodecFilter( this
+                .getProtocolCodecFactory() ) );
+
             // Now inject an ExecutorFilter for the write operations
             // We use the same number of thread than the number of IoProcessor
             // (NOTE : this has to be double checked)
-            ((DefaultIoFilterChainBuilder)chain).addLast( "executor", 
-                    new ExecutorFilter( 
-                        new UnorderedThreadPoolExecutor( transport.getNbThreads() ),
-                        IoEventType.MESSAGE_RECEIVED ) );
+            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "executor", new ExecutorFilter(
+                new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED ) );
 
             /*
              * The server is now initialized, we can
              * install the default requests handlers, which need 
              * access to the DirectoryServer instance.
-             */ 
-            installDefaultHandlers();      
-            
+             */
+            installDefaultHandlers();
+
             startNetwork( transport, chain );
         }
-        
-        if( replicationProvider != null )
+
+        if ( replicationProvider != null )
         {
             replicationProvider.init( this );
             ( ( SearchHandler ) getSearchHandler() ).setReplicationProvider( replicationProvider );
         }
-        
+
         startConsumers();
 
         started = true;
-        
+
         LOG.info( "Ldap service started." );
     }
 
@@ -483,66 +479,65 @@ public class LdapServer extends Director
     {
         try
         {
-            for ( Transport transport:transports )
+            for ( Transport transport : transports )
             {
-                if ( !(transport instanceof TcpTransport ) )
+                if ( !( transport instanceof TcpTransport ) )
                 {
                     continue;
                 }
-                
+
                 // we should unbind the service before we begin sending the notice
                 // of disconnect so new connections are not formed while we process
                 List<WriteFuture> writeFutures = new ArrayList<WriteFuture>();
-    
+
                 // If the socket has already been unbound as with a successful
                 // GracefulShutdownRequest then this will complain that the service
                 // is not bound - this is ok because the GracefulShutdown has already
                 // sent notices to to the existing active sessions
                 List<IoSession> sessions;
-    
+
                 try
                 {
-                    sessions = new ArrayList<IoSession>(
-                            getSocketAcceptor( transport ).getManagedSessions().values() );
+                    sessions = new ArrayList<IoSession>( getSocketAcceptor( transport ).getManagedSessions().values() );
                 }
                 catch ( IllegalArgumentException e )
                 {
                     LOG.warn( "Seems like the LDAP service (" + getPort() + ") has already been unbound." );
                     return;
                 }
-    
+
                 getSocketAcceptor( transport ).dispose();
-    
+
                 if ( LOG.isInfoEnabled() )
                 {
                     LOG.info( "Unbind of an LDAP service (" + getPort() + ") is complete." );
                     LOG.info( "Sending notice of disconnect to existing clients sessions." );
                 }
-    
+
                 // Send Notification of Disconnection messages to all connected clients.
                 if ( sessions != null )
                 {
-                    for ( IoSession session:sessions )
+                    for ( IoSession session : sessions )
                     {
                         writeFutures.add( session.write( NoticeOfDisconnect.UNAVAILABLE ) );
                     }
                 }
-    
+
                 // And close the connections when the NoDs are sent.
                 Iterator<IoSession> sessionIt = sessions.iterator();
-    
-                for ( WriteFuture future:writeFutures )
+
+                for ( WriteFuture future : writeFutures )
                 {
                     future.await( 1000L );
                     sessionIt.next().close( true );
                 }
 
-                if( replicationProvider != null )
+                if ( replicationProvider != null )
                 {
                     replicationProvider.stop();
                 }
             }
-            
+
             stopConsumers();
         }
         catch ( Exception e )
@@ -554,10 +549,9 @@ public class LdapServer extends Director
     }
 
 
-    private void startNetwork( Transport transport, IoFilterChainBuilder chainBuilder )
-        throws Exception
+    private void startNetwork( Transport transport, IoFilterChainBuilder chainBuilder ) throws Exception
     {
-        if ( transport.getBackLog() < 0 ) 
+        if ( transport.getBackLog() < 0 )
         {
             // Set the backlog to the default value when it's below 0
             transport.setBackLog( 50 );
@@ -579,29 +573,29 @@ public class LdapServer extends Director
         try
         {
             SocketAcceptor acceptor = getSocketAcceptor( transport );
-            
+
             // Now, configure the acceptor
             // Disable the disconnection of the clients on unbind
             acceptor.setCloseOnDeactivation( false );
-            
+
             // Allow the port to be reused even if the socket is in TIME_WAIT state
             acceptor.setReuseAddress( true );
-            
+
             // No Nagle's algorithm
             acceptor.getSessionConfig().setTcpNoDelay( true );
-            
+
             // Inject the chain
             acceptor.setFilterChainBuilder( chainBuilder );
-            
+
             // Inject the protocol handler
             acceptor.setHandler( getHandler() );
-            
-            ((AbstractSocketSessionConfig)acceptor.getSessionConfig()).setReadBufferSize( 64*1024 );
-            ((AbstractSocketSessionConfig)acceptor.getSessionConfig()).setSendBufferSize( 64*1024 );
+
+            ( ( AbstractSocketSessionConfig ) acceptor.getSessionConfig() ).setReadBufferSize( 64 * 1024 );
+            ( ( AbstractSocketSessionConfig ) acceptor.getSessionConfig() ).setSendBufferSize( 64 * 1024 );
 
             // Bind to the configured address
             acceptor.bind();
-            
+
             // We are done !
             started = true;
 
@@ -626,11 +620,11 @@ public class LdapServer extends Director
      */
     private void startConsumers() throws Exception
     {
-        if( providerConfigs != null )
+        if ( providerConfigs != null )
         {
             replConsumers = new ArrayList<SyncReplConsumer>( providerConfigs.size() );
-            
-            for( final SyncreplConfiguration config : providerConfigs )
+
+            for ( final SyncreplConfiguration config : providerConfigs )
             {
                 Runnable consumerTask = new Runnable()
                 {
@@ -645,14 +639,14 @@ public class LdapServer extends Director
                             replConsumers.add( consumer );
                             consumer.startSync();
                         }
-                        catch( Exception e )
+                        catch ( Exception e )
                         {
                             LOG.error( "Failed to start the consumer with config {}", config );
                             throw new RuntimeException( e );
                         }
                     }
                 };
-                
+
                 Thread consumerThread = new Thread( consumerTask );
                 consumerThread.setDaemon( true );
                 consumerThread.start();
@@ -666,17 +660,17 @@ public class LdapServer extends Director
      */
     private void stopConsumers()
     {
-        if( replConsumers != null )
+        if ( replConsumers != null )
         {
-            for( SyncReplConsumer consumer : replConsumers )
+            for ( SyncReplConsumer consumer : replConsumers )
             {
                 LOG.info( "stopping the consumer with id {}", consumer.getConfig().getReplicaId() );
                 consumer.disconnet();
             }
         }
     }
-    
-    
+
+
     public String getName()
     {
         return SERVICE_NAME;
@@ -687,25 +681,24 @@ public class LdapServer extends Director
     {
         return handler;
     }
-    
-    
+
+
     public LdapSessionManager getLdapSessionManager()
     {
         return ldapSessionManager;
     }
-    
-    
+
+
     public ProtocolCodecFactory getProtocolCodecFactory()
     {
         return codecFactory;
     }
 
-    
+
     // ------------------------------------------------------------------------
     // Configuration Methods
     // ------------------------------------------------------------------------
 
-
     /**
      * Registeres the specified {@link ExtendedOperationHandler} to this
      * protocol provider to provide a specific LDAP extended operation.
@@ -800,7 +793,7 @@ public class LdapServer extends Director
         return confidentialityRequired;
     }
 
-    
+
     /**
      * Returns <tt>true</tt> if LDAPS is enabled.
      *
@@ -996,6 +989,7 @@ public class LdapServer extends Director
         return saslMechanismHandlers;
     }
 
+
     public void setSaslMechanismHandlers( Map<String, MechanismHandler> saslMechanismHandlers )
     {
         this.saslMechanismHandlers = saslMechanismHandlers;
@@ -1047,7 +1041,7 @@ public class LdapServer extends Director
     }
 
 
-    public MessageHandler<InternalAbandonRequest> getAbandonHandler()
+    public MessageHandler<AbandonRequest> getAbandonHandler()
     {
         return abandonHandler;
     }
@@ -1056,16 +1050,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The AbandonRequest handler
      */
-    public void setAbandonHandler( LdapRequestHandler<InternalAbandonRequest> abandonHandler )
+    public void setAbandonHandler( LdapRequestHandler<AbandonRequest> abandonHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalAbandonRequest.class );
+        this.handler.removeReceivedMessageHandler( AbandonRequest.class );
         this.abandonHandler = abandonHandler;
         this.abandonHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalAbandonRequest.class, this.abandonHandler );
+        this.handler.addReceivedMessageHandler( AbandonRequest.class, this.abandonHandler );
     }
 
 
-    public LdapRequestHandler<InternalAddRequest> getAddHandler()
+    public LdapRequestHandler<AddRequest> getAddHandler()
     {
         return addHandler;
     }
@@ -1074,16 +1068,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The AddRequest handler
      */
-    public void setAddHandler( LdapRequestHandler<InternalAddRequest> addHandler )
+    public void setAddHandler( LdapRequestHandler<AddRequest> addHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalAddRequest.class );
+        this.handler.removeReceivedMessageHandler( AddRequest.class );
         this.addHandler = addHandler;
         this.addHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalAddRequest.class, this.addHandler );
+        this.handler.addReceivedMessageHandler( AddRequest.class, this.addHandler );
     }
 
 
-    public LdapRequestHandler<InternalBindRequest> getBindHandler()
+    public LdapRequestHandler<BindRequest> getBindHandler()
     {
         return bindHandler;
     }
@@ -1092,17 +1086,17 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The BindRequest handler
      */
-    public void setBindHandler( LdapRequestHandler<InternalBindRequest> bindHandler )
+    public void setBindHandler( LdapRequestHandler<BindRequest> bindHandler )
     {
         this.bindHandler = bindHandler;
         this.bindHandler.setLdapServer( this );
 
-        handler.removeReceivedMessageHandler( InternalBindRequest.class );
-        handler.addReceivedMessageHandler( InternalBindRequest.class, this.bindHandler );
+        handler.removeReceivedMessageHandler( BindRequest.class );
+        handler.addReceivedMessageHandler( BindRequest.class, this.bindHandler );
     }
 
 
-    public LdapRequestHandler<InternalCompareRequest> getCompareHandler()
+    public LdapRequestHandler<CompareRequest> getCompareHandler()
     {
         return compareHandler;
     }
@@ -1111,16 +1105,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The CompareRequest handler
      */
-    public void setCompareHandler( LdapRequestHandler<InternalCompareRequest> compareHandler )
+    public void setCompareHandler( LdapRequestHandler<CompareRequest> compareHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalCompareRequest.class );
+        this.handler.removeReceivedMessageHandler( CompareRequest.class );
         this.compareHandler = compareHandler;
         this.compareHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalCompareRequest.class, this.compareHandler );
+        this.handler.addReceivedMessageHandler( CompareRequest.class, this.compareHandler );
     }
 
 
-    public LdapRequestHandler<InternalDeleteRequest> getDeleteHandler()
+    public LdapRequestHandler<DeleteRequest> getDeleteHandler()
     {
         return deleteHandler;
     }
@@ -1129,16 +1123,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The DeleteRequest handler
      */
-    public void setDeleteHandler( LdapRequestHandler<InternalDeleteRequest> deleteHandler )
+    public void setDeleteHandler( LdapRequestHandler<DeleteRequest> deleteHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalDeleteRequest.class );
+        this.handler.removeReceivedMessageHandler( DeleteRequest.class );
         this.deleteHandler = deleteHandler;
         this.deleteHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalDeleteRequest.class, this.deleteHandler );
+        this.handler.addReceivedMessageHandler( DeleteRequest.class, this.deleteHandler );
     }
 
 
-    public LdapRequestHandler<InternalExtendedRequest> getExtendedHandler()
+    public LdapRequestHandler<ExtendedRequest> getExtendedHandler()
     {
         return extendedHandler;
     }
@@ -1147,16 +1141,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The ExtendedRequest handler
      */
-    public void setExtendedHandler( LdapRequestHandler<InternalExtendedRequest> extendedHandler )
+    public void setExtendedHandler( LdapRequestHandler<ExtendedRequest> extendedHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalExtendedRequest.class );
+        this.handler.removeReceivedMessageHandler( ExtendedRequest.class );
         this.extendedHandler = extendedHandler;
         this.extendedHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalExtendedRequest.class, this.extendedHandler );
+        this.handler.addReceivedMessageHandler( ExtendedRequest.class, this.extendedHandler );
     }
 
 
-    public LdapRequestHandler<InternalModifyRequest> getModifyHandler()
+    public LdapRequestHandler<ModifyRequest> getModifyHandler()
     {
         return modifyHandler;
     }
@@ -1165,16 +1159,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The ModifyRequest handler
      */
-    public void setModifyHandler( LdapRequestHandler<InternalModifyRequest> modifyHandler )
+    public void setModifyHandler( LdapRequestHandler<ModifyRequest> modifyHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalModifyRequest.class );
+        this.handler.removeReceivedMessageHandler( ModifyRequest.class );
         this.modifyHandler = modifyHandler;
         this.modifyHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalModifyRequest.class, this.modifyHandler );
+        this.handler.addReceivedMessageHandler( ModifyRequest.class, this.modifyHandler );
     }
 
 
-    public LdapRequestHandler<InternalModifyDnRequest> getModifyDnHandler()
+    public LdapRequestHandler<ModifyDnRequest> getModifyDnHandler()
     {
         return modifyDnHandler;
     }
@@ -1183,16 +1177,16 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The ModifyDNRequest handler
      */
-    public void setModifyDnHandler( LdapRequestHandler<InternalModifyDnRequest> modifyDnHandler )
+    public void setModifyDnHandler( LdapRequestHandler<ModifyDnRequest> modifyDnHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalModifyDnRequest.class );
+        this.handler.removeReceivedMessageHandler( ModifyDnRequest.class );
         this.modifyDnHandler = modifyDnHandler;
         this.modifyDnHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalModifyDnRequest.class, this.modifyDnHandler );
+        this.handler.addReceivedMessageHandler( ModifyDnRequest.class, this.modifyDnHandler );
     }
 
 
-    public LdapRequestHandler<InternalSearchRequest> getSearchHandler()
+    public LdapRequestHandler<SearchRequest> getSearchHandler()
     {
         return searchHandler;
     }
@@ -1201,21 +1195,21 @@ public class LdapServer extends Director
     /**
      * @param abandonHandler The SearchRequest handler
      */
-    public void setSearchHandler( LdapRequestHandler<InternalSearchRequest> searchHandler )
+    public void setSearchHandler( LdapRequestHandler<SearchRequest> searchHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalSearchRequest.class );
+        this.handler.removeReceivedMessageHandler( SearchRequest.class );
         this.searchHandler = searchHandler;
         this.searchHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalSearchRequest.class, this.searchHandler );
+        this.handler.addReceivedMessageHandler( SearchRequest.class, this.searchHandler );
     }
 
 
-    public LdapRequestHandler<InternalUnbindRequest> getUnbindHandler()
+    public LdapRequestHandler<UnbindRequest> getUnbindHandler()
     {
         return unbindHandler;
     }
-    
-    
+
+
     /**
      * @return The underlying TCP transport port, or -1 if no transport has been 
      * initialized
@@ -1226,20 +1220,20 @@ public class LdapServer extends Director
         {
             return -1;
         }
-        
-        for ( Transport transport:transports )
+
+        for ( Transport transport : transports )
         {
             if ( transport instanceof UdpTransport )
             {
                 continue;
             }
-            
+
             if ( !transport.isSSLEnabled() )
             {
                 return transport.getPort();
             }
         }
-        
+
         return -1;
     }
 
@@ -1254,32 +1248,33 @@ public class LdapServer extends Director
         {
             return -1;
         }
-        
-        for ( Transport transport:transports )
+
+        for ( Transport transport : transports )
         {
             if ( transport instanceof UdpTransport )
             {
                 continue;
             }
-            
+
             if ( transport.isSSLEnabled() )
             {
                 return transport.getPort();
             }
         }
-        
+
         return -1;
     }
 
+
     /**
      * @param abandonHandler The UnbindRequest handler
      */
-    public void setUnbindHandler( LdapRequestHandler<InternalUnbindRequest> unbindHandler )
+    public void setUnbindHandler( LdapRequestHandler<UnbindRequest> unbindHandler )
     {
-        this.handler.removeReceivedMessageHandler( InternalUnbindRequest.class );
+        this.handler.removeReceivedMessageHandler( UnbindRequest.class );
         this.unbindHandler = unbindHandler;
         this.unbindHandler.setLdapServer( this );
-        this.handler.addReceivedMessageHandler( InternalUnbindRequest.class, this.unbindHandler );
+        this.handler.addReceivedMessageHandler( UnbindRequest.class, this.unbindHandler );
     }
 
 
@@ -1353,17 +1348,17 @@ public class LdapServer extends Director
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "LdapServer[" ).append( getServiceName() ).append( "], listening on :" ).append( '\n' );
-        
+
         if ( getTransports() != null )
         {
-            for ( Transport transport:getTransports() )
+            for ( Transport transport : getTransports() )
             {
                 sb.append( "    " ).append( transport ).append( '\n' );
             }
         }
-        
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java Fri Aug 20 19:31:58 2010
@@ -31,8 +31,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.handlers.controls.PagedSearchContext;
+import org.apache.directory.shared.ldap.message.AbandonableRequest;
 import org.apache.directory.shared.ldap.message.BindStatus;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonableRequest;
 import org.apache.mina.core.session.IoSession;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -53,7 +53,7 @@ public class LdapSession
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The list of requests we can abandon */
-    private static final InternalAbandonableRequest[] EMPTY_ABANDONABLES = new InternalAbandonableRequest[0]; 
+    private static final AbandonableRequest[] EMPTY_ABANDONABLES = new AbandonableRequest[0]; 
     
     /** A lock to protect the abandonableRequests against concurrent access */
     private final String outstandingLock;
@@ -71,7 +71,7 @@ public class LdapSession
     private LdapServer ldapServer;
     
     /** A map of all the running requests */
-    private Map<Integer, InternalAbandonableRequest> outstandingRequests;
+    private Map<Integer, AbandonableRequest> outstandingRequests;
     
     /** The current Bind status */
     private BindStatus bindStatus;
@@ -98,7 +98,7 @@ public class LdapSession
     {
         this.ioSession = ioSession;
         outstandingLock = "OutstandingRequestLock: " + ioSession.toString();
-        outstandingRequests = new ConcurrentHashMap<Integer, InternalAbandonableRequest>();
+        outstandingRequests = new ConcurrentHashMap<Integer, AbandonableRequest>();
         bindStatus = BindStatus.ANONYMOUS;
         saslProperties = new HashMap<String, Object>();
         pagedSearchContexts = new ConcurrentHashMap<Integer, PagedSearchContext>();
@@ -209,9 +209,9 @@ public class LdapSession
     {
         synchronized ( outstandingLock )
         {
-            InternalAbandonableRequest[] abandonables = outstandingRequests.values().toArray( EMPTY_ABANDONABLES );
+            AbandonableRequest[] abandonables = outstandingRequests.values().toArray( EMPTY_ABANDONABLES );
             
-            for ( InternalAbandonableRequest abandonable : abandonables )
+            for ( AbandonableRequest abandonable : abandonables )
             {
                 abandonOutstandingRequest( abandonable.getMessageId() );
             }
@@ -224,9 +224,9 @@ public class LdapSession
      * 
      * @param messageId The request ID to abandon
      */
-    public InternalAbandonableRequest abandonOutstandingRequest( int messageId )
+    public AbandonableRequest abandonOutstandingRequest( int messageId )
     {
-        InternalAbandonableRequest request = null;
+        AbandonableRequest request = null;
         
         synchronized ( outstandingLock )
         {
@@ -261,7 +261,7 @@ public class LdapSession
      *
      * @param request an outstanding request that can be abandoned
      */
-    public void registerOutstandingRequest( InternalAbandonableRequest request )
+    public void registerOutstandingRequest( AbandonableRequest request )
     {
         synchronized( outstandingLock )
         {
@@ -275,7 +275,7 @@ public class LdapSession
      *
      * @param request the request to unregister
      */
-    public void unregisterOutstandingRequest( InternalAbandonableRequest request )
+    public void unregisterOutstandingRequest( AbandonableRequest request )
     {
         synchronized( outstandingLock )
         {
@@ -287,7 +287,7 @@ public class LdapSession
     /**
      * @return A list of all the abandonable requests for this session. 
      */
-    public Map<Integer, InternalAbandonableRequest> getOutstandingRequests()
+    public Map<Integer, AbandonableRequest> getOutstandingRequests()
     {
         synchronized( outstandingLock )
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AbandonHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AbandonHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AbandonHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AbandonHandler.java Fri Aug 20 19:31:58 2010
@@ -21,7 +21,7 @@ package org.apache.directory.server.ldap
 
 
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
 
 
 /**
@@ -29,13 +29,13 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AbandonHandler extends LdapRequestHandler<InternalAbandonRequest>
+public class AbandonHandler extends LdapRequestHandler<AbandonRequest>
 {
     /**
      * @see org.apache.directory.server.ldap.handlers.LdapRequestHandler#
      * handle(org.apache.directory.server.ldap.LdapSession, org.apache.directory.shared.ldap.message.Request)
      */
-    public void handle( LdapSession session, InternalAbandonRequest request ) throws Exception
+    public void handle( LdapSession session, AbandonRequest request ) throws Exception
     {
         int abandonedId = request.getAbandoned();
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java Fri Aug 20 19:31:58 2010
@@ -22,20 +22,20 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * An LDAP add operation {@link InternalAddRequest} handler.
+ * An LDAP add operation {@link AddRequest} handler.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddHandler extends LdapRequestHandler<InternalAddRequest>
+public class AddHandler extends LdapRequestHandler<AddRequest>
 {
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AddHandler.class );
@@ -44,10 +44,10 @@ public class AddHandler extends LdapRequ
     /**
      * {@inheritDoc}
      */
-    public void handle( LdapSession session, InternalAddRequest req ) 
+    public void handle( LdapSession session, AddRequest req ) 
     {
         LOG.debug( "Handling request: {}", req );
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         try
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Fri Aug 20 19:31:58 2010
@@ -42,10 +42,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -53,13 +53,13 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * A single reply handler for {@link InternalBindRequest}s.
+ * A single reply handler for {@link BindRequest}s.
  *
  * Implements server-side of RFC 2222, sections 4.2 and 4.3.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindHandler extends LdapRequestHandler<InternalBindRequest>
+public class BindHandler extends LdapRequestHandler<BindRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( BindHandler.class );
 
@@ -87,7 +87,7 @@ public class BindHandler extends LdapReq
      */
     // This will suppress PMD.EmptyCatchBlock warnings in this method
     @SuppressWarnings("PMD.EmptyCatchBlock")
-    public void handleSimpleAuth( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public void handleSimpleAuth( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         // if the user is already bound, we have to unbind him
         if ( ldapSession.isAuthenticated() )
@@ -105,7 +105,7 @@ public class BindHandler extends LdapReq
         // create a new Bind context, with a null session, as we don't have 
         // any context yet.
         BindOperationContext bindContext = new BindOperationContext( null );
-        
+
         // Stores the DN of the user to check, and its password
         bindContext.setDn( bindRequest.getName() );
         bindContext.setCredentials( bindRequest.getCredentials() );
@@ -146,18 +146,18 @@ public class BindHandler extends LdapReq
             if ( principalEntry == null )
             {
                 LOG.info( "The {} principalDN cannot be found in the server : bind failure.", bindRequest.getName() );
-                InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+                LdapResult result = bindRequest.getResultResponse().getLdapResult();
                 result.setErrorMessage( "cannot bind the principalDn." );
                 result.setResultCode( ResultCodeEnum.INVALID_CREDENTIALS );
                 ldapSession.getIoSession().write( bindRequest.getResultResponse() );
                 return;
             }
 
-            if ( ((ClonedServerEntry)principalEntry).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT,
+            if ( ( ( ClonedServerEntry ) principalEntry ).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT,
                 SchemaConstants.REFERRAL_OC ) )
             {
                 LOG.info( "Bind principalDn points to referral." );
-                InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+                LdapResult result = bindRequest.getResultResponse().getLdapResult();
                 result.setErrorMessage( "Bind principalDn points to referral." );
                 result.setResultCode( ResultCodeEnum.INVALID_CREDENTIALS );
                 ldapSession.getIoSession().write( bindRequest.getResultResponse() );
@@ -186,9 +186,9 @@ public class BindHandler extends LdapReq
             {
                 ldapSession.setAnonymous();
             }
-            
+
             // Return the successful response
-            bindRequest.getResultResponse().addAll( bindContext.getResponseControls() ); 
+            bindRequest.getResultResponse().addAllControls( bindContext.getResponseControls() );
             sendBindSuccess( ldapSession, bindRequest, null );
         }
         catch ( Exception e )
@@ -197,7 +197,7 @@ public class BindHandler extends LdapReq
             // For BindRequest, it should be an InvalidCredentials, 
             // no matter what kind of exception we got.
             ResultCodeEnum code = null;
-            InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+            LdapResult result = bindRequest.getResultResponse().getLdapResult();
 
             if ( e instanceof LdapUnwillingToPerformException )
             {
@@ -209,7 +209,7 @@ public class BindHandler extends LdapReq
                 code = ResultCodeEnum.INVALID_DN_SYNTAX;
                 result.setResultCode( code );
             }
-            else 
+            else
             {
                 code = ResultCodeEnum.INVALID_CREDENTIALS;
                 result.setResultCode( code );
@@ -238,7 +238,7 @@ public class BindHandler extends LdapReq
             }
 
             result.setErrorMessage( msg );
-            bindRequest.getResultResponse().addAll( bindContext.getResponseControls() );
+            bindRequest.getResultResponse().addAllControls( bindContext.getResponseControls() );
             ldapSession.getIoSession().write( bindRequest.getResultResponse() );
         }
     }
@@ -272,9 +272,9 @@ public class BindHandler extends LdapReq
      * @param bindRequest
      */
     private void generateSaslChallengeOrComplete( LdapSession ldapSession, SaslServer ss,
-        InternalBindRequest bindRequest ) throws Exception
+        BindRequest bindRequest ) throws Exception
     {
-        InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+        LdapResult result = bindRequest.getResultResponse().getLdapResult();
 
         // SaslServer will throw an exception if the credentials are null.
         if ( bindRequest.getCredentials() == null )
@@ -306,8 +306,8 @@ public class BindHandler extends LdapReq
                 {
                     DirectoryService ds = ldapSession.getLdapServer().getDirectoryService();
                     String saslMechanism = bindRequest.getSaslMechanism();
-                    CoreSession userSession = ds.getSession( ldapPrincipal.getDN(), ldapPrincipal
-                        .getUserPassword(), saslMechanism, null );
+                    CoreSession userSession = ds.getSession( ldapPrincipal.getDN(), ldapPrincipal.getUserPassword(),
+                        saslMechanism, null );
 
                     // Set the user session into the ldap session 
                     ldapSession.setCoreSession( userSession );
@@ -331,7 +331,7 @@ public class BindHandler extends LdapReq
 
                 // Build the response
                 result.setResultCode( ResultCodeEnum.SASL_BIND_IN_PROGRESS );
-                InternalBindResponse resp = ( InternalBindResponse ) bindRequest.getResultResponse();
+                BindResponse resp = ( BindResponse ) bindRequest.getResultResponse();
 
                 // Store the challenge
                 resp.setServerSaslCreds( tokenBytes );
@@ -354,7 +354,7 @@ public class BindHandler extends LdapReq
     /**
      * Send back an AUTH-METH-NOT-SUPPORTED error message to the client
      */
-    private void sendAuthMethNotSupported( LdapSession ldapSession, InternalBindRequest bindRequest )
+    private void sendAuthMethNotSupported( LdapSession ldapSession, BindRequest bindRequest )
     {
         // First, r-einit the state to Anonymous, and clear the
         // saslProperty map
@@ -362,7 +362,7 @@ public class BindHandler extends LdapReq
         ldapSession.setAnonymous();
 
         // And send the response to the client
-        InternalLdapResult bindResult = bindRequest.getResultResponse().getLdapResult();
+        LdapResult bindResult = bindRequest.getResultResponse().getLdapResult();
         bindResult.setResultCode( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED );
         bindResult.setErrorMessage( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED.toString() + ": "
             + bindRequest.getSaslMechanism() + " is not a supported mechanism." );
@@ -376,9 +376,9 @@ public class BindHandler extends LdapReq
      * Send back an INVALID-CREDENTIAL error message to the user. If we have an exception
      * as a third argument, then send back the associated message to the client. 
      */
-    private void sendInvalidCredentials( LdapSession ldapSession, InternalBindRequest bindRequest, Exception e )
+    private void sendInvalidCredentials( LdapSession ldapSession, BindRequest bindRequest, Exception e )
     {
-        InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+        LdapResult result = bindRequest.getResultResponse().getLdapResult();
 
         String message = "";
 
@@ -407,10 +407,10 @@ public class BindHandler extends LdapReq
     /**
      * Send a SUCCESS message back to the client.
      */
-    private void sendBindSuccess( LdapSession ldapSession, InternalBindRequest bindRequest, byte[] tokenBytes )
+    private void sendBindSuccess( LdapSession ldapSession, BindRequest bindRequest, byte[] tokenBytes )
     {
         // Return the successful response
-        InternalBindResponse response = ( InternalBindResponse ) bindRequest.getResultResponse();
+        BindResponse response = ( BindResponse ) bindRequest.getResultResponse();
         response.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
         response.setServerSaslCreds( tokenBytes );
 
@@ -439,8 +439,7 @@ public class BindHandler extends LdapReq
     }
 
 
-    private void handleSaslAuthPending( LdapSession ldapSession, InternalBindRequest bindRequest )
-        throws Exception
+    private void handleSaslAuthPending( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         // First, check that we have the same mechanism
         String saslMechanism = bindRequest.getSaslMechanism();
@@ -502,7 +501,7 @@ public class BindHandler extends LdapReq
      * @param message The BindRequest received
      * @throws Exception If the authentication cannot be done
      */
-    public void handleSaslAuth( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public void handleSaslAuth( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         String saslMechanism = bindRequest.getSaslMechanism();
 
@@ -582,7 +581,7 @@ public class BindHandler extends LdapReq
      * @throws Exception If the authentication cannot be handled
      */
     @Override
-    public void handle( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public void handle( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         LOG.debug( "Received: {}", bindRequest );
 
@@ -590,7 +589,7 @@ public class BindHandler extends LdapReq
         if ( !bindRequest.getVersion3() )
         {
             LOG.error( I18n.err( I18n.ERR_162 ) );
-            InternalLdapResult bindResult = bindRequest.getResultResponse().getLdapResult();
+            LdapResult bindResult = bindRequest.getResultResponse().getLdapResult();
             bindResult.setResultCode( ResultCodeEnum.PROTOCOL_ERROR );
             bindResult.setErrorMessage( I18n.err( I18n.ERR_163 ) );
             ldapSession.getIoSession().write( bindRequest.getResultResponse() );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java Fri Aug 20 19:31:58 2010
@@ -21,20 +21,20 @@ package org.apache.directory.server.ldap
 
 
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalCompareRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * A single reply handler for {@link InternalCompareRequest}s.
+ * A single reply handler for {@link CompareRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareHandler extends LdapRequestHandler<InternalCompareRequest>
+public class CompareHandler extends LdapRequestHandler<CompareRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( CompareHandler.class );
 
@@ -45,10 +45,10 @@ public class CompareHandler extends Ldap
      * org.apache.directory.shared.ldap.message.SingleReplyRequest)
      */
     @Override
-    public void handle( LdapSession session, InternalCompareRequest req )
+    public void handle( LdapSession session, CompareRequest req )
     {
         LOG.debug( "Handling compare request while ignoring referrals: {}", req );
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
         
         try
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java Fri Aug 20 19:31:58 2010
@@ -22,20 +22,20 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * A single reply handler for {@link InternalDeleteRequest}s.
+ * A single reply handler for {@link DeleteRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteHandler extends LdapRequestHandler<InternalDeleteRequest>
+public class DeleteHandler extends LdapRequestHandler<DeleteRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( DeleteHandler.class );
 
@@ -43,10 +43,10 @@ public class DeleteHandler extends LdapR
     /**
      * {@inheritDoc}
      */
-    public void handle( LdapSession session, InternalDeleteRequest req )
+    public void handle( LdapSession session, DeleteRequest req )
     {
         LOG.debug( "Handling request: {}", req );
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         try
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java Fri Aug 20 19:31:58 2010
@@ -1,70 +1,70 @@
-    /*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
+/*
+*  Licensed to the Apache Software Foundation (ASF) under one
+*  or more contributor license agreements.  See the NOTICE file
+*  distributed with this work for additional information
+*  regarding copyright ownership.  The ASF licenses this file
+*  to you under the Apache License, Version 2.0 (the
+*  "License"); you may not use this file except in compliance
+*  with the License.  You may obtain a copy of the License at
+*  
+*    http://www.apache.org/licenses/LICENSE-2.0
+*  
+*  Unless required by applicable law or agreed to in writing,
+*  software distributed under the License is distributed on an
+*  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*  KIND, either express or implied.  See the License for the
+*  specific language governing permissions and limitations
+*  under the License. 
+*  
+*/
 package org.apache.directory.server.ldap.handlers;
 
 
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 
 
 /**
-* A single reply handler for {@link InternalExtendedRequest}s.
+* A single reply handler for {@link ExtendedRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedHandler extends LdapRequestHandler<InternalExtendedRequest>
+public class ExtendedHandler extends LdapRequestHandler<ExtendedRequest>
 {
-    public void handle( LdapSession session, InternalExtendedRequest req ) throws Exception
+    public void handle( LdapSession session, ExtendedRequest req ) throws Exception
     {
-        ExtendedOperationHandler handler = getLdapServer().getExtendedOperationHandler( req.getOid() );
+        ExtendedOperationHandler handler = getLdapServer().getExtendedOperationHandler( req.getRequestName() );
 
         if ( handler == null )
         {
             // As long as no extended operations are implemented, send appropriate
             // error back to the client.
-            String msg = "Unrecognized extended operation EXTENSION_OID: " + req.getOid();
-            InternalLdapResult result = req.getResultResponse().getLdapResult();
+            String msg = "Unrecognized extended operation EXTENSION_OID: " + req.getRequestName();
+            LdapResult result = req.getResultResponse().getLdapResult();
             result.setResultCode( ResultCodeEnum.PROTOCOL_ERROR );
             result.setErrorMessage( msg );
             session.getIoSession().write( req.getResultResponse() );
             return;
         }
-        
+
         try
         {
             handler.handleExtendedOperation( session, req );
         }
         catch ( Exception e )
         {
-            InternalLdapResult result = req.getResultResponse().getLdapResult();
+            LdapResult result = req.getResultResponse().getLdapResult();
             result.setResultCode( ResultCodeEnum.OTHER );
-            result.setErrorMessage( ResultCodeEnum.OTHER  
-                + ": Extended operation handler for the specified EXTENSION_OID (" + req.getOid()
+            result.setErrorMessage( ResultCodeEnum.OTHER
+                + ": Extended operation handler for the specified EXTENSION_OID (" + req.getRequestName()
                 + ") has failed to process your request:\n" + ExceptionUtils.getStackTrace( e ) );
-            InternalExtendedResponse resp = ( InternalExtendedResponse ) req.getResultResponse();
-            resp.setResponse( new byte[0] );
+            ExtendedResponse resp = ( ExtendedResponse ) req.getResultResponse();
+            resp.setResponseValue( new byte[0] );
             session.getIoSession().write( req.getResultResponse() );
         }
     }



Mime
View raw message