directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1091456 [1/2] - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ apacheds/trunk/server-integ/src/test/ja...
Date Tue, 12 Apr 2011 15:18:06 GMT
Author: elecharny
Date: Tue Apr 12 15:18:04 2011
New Revision: 1091456

URL: http://svn.apache.org/viewvc?rev=1091456&view=rev
Log:
o Removed the Message consructor taking a MessageId as a parameter
o Added a Abandon test

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/abandonRequest/InitAbandonRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/InitAddRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/compareRequest/InitCompareRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/delRequest/InitDelRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyDnRequest/InitModifyDnRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/InitModifyRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchRequest/InitSearchRequest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/unbindRequest/InitUnbindRequest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/BindRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/CompareRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImplTest.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Tue Apr 12 15:18:04 2011
@@ -36,9 +36,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.entry.Value;
@@ -592,7 +592,8 @@ public class LdapCoreSessionConnection i
         ModifyResponse resp = new ModifyResponseImpl( newId );
         resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
-        ModifyRequest iModReq = new ModifyRequestImpl( newId );
+        ModifyRequest iModReq = new ModifyRequestImpl();
+        iModReq.setMessageId( newId );
 
         try
         {
@@ -642,7 +643,8 @@ public class LdapCoreSessionConnection i
         ModifyResponse resp = new ModifyResponseImpl( newId );
         resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
-        ModifyRequest iModReq = new ModifyRequestImpl( newId );
+        ModifyRequest iModReq = new ModifyRequestImpl();
+        iModReq.setMessageId( newId );
 
         try
         {

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java Tue Apr 12 15:18:04 2011
@@ -35,9 +35,12 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.message.AbandonRequest;
+import org.apache.directory.shared.ldap.model.message.AbandonRequestImpl;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.Response;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
+import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -76,7 +79,7 @@ public class ClientAbandonRequestTest ex
 
 
     @Test
-    public void testAbandonSearch() throws Exception
+    public void testCancelSearch() throws Exception
     {
         // injecting some values to keep the
         // followed search operation to run for a while
@@ -94,7 +97,7 @@ public class ClientAbandonRequestTest ex
             connection.add( entry );
         }
 
-        SearchRequest sr = new org.apache.directory.shared.ldap.model.message.SearchRequestImpl();
+        SearchRequest sr = new SearchRequestImpl();
         sr.setFilter( "(cn=*)" );
         sr.setBase( new Dn( "ou=system" ) );
         sr.setScope( SearchScope.ONELEVEL );
@@ -136,4 +139,49 @@ public class ClientAbandonRequestTest ex
 
         assertEquals( numEntries, n );
     }
+
+
+    @Test
+    public void testAbandonSearch() throws Exception
+    {
+        // injecting some values to keep the
+        // followed search operation to run for a while
+        final int numEntries = 100;
+
+        for ( int i = 0; i < numEntries; i++ )
+        {
+            String s = String.valueOf( i );
+            Dn dn = new Dn( "cn=" + s + ",ou=system" );
+            Entry entry = new DefaultEntry( dn );
+            entry.add( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.PERSON_OC );
+            entry.add( SchemaConstants.CN_AT, s );
+            entry.add( SchemaConstants.SN_AT, s );
+
+            connection.add( entry );
+        }
+
+        // Launch the search now
+        Cursor<Response> cursor = connection.search( new Dn( "ou=system" ), "(cn=*)", SearchScope.ONELEVEL, "*" );
+
+        Response searchResponse = null;
+        int count = 0;
+
+        while ( cursor.next() )
+        {
+            searchResponse = cursor.get();
+            count++;
+
+            if ( count > 10 )
+            {
+                // Abandon the search request
+                AbandonRequest abandon = new AbandonRequestImpl( searchResponse.getMessageId() );
+                connection.abandon( abandon );
+            }
+        }
+        
+        cursor.close();
+
+        System.out.println( "Responses received / expected : " + count + "/" + numEntries );
+        assertTrue( numEntries > count );
+    }
 }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Tue Apr 12 15:18:04 2011
@@ -610,7 +610,8 @@ public class SaslBindIT extends Abstract
             }
 
             // Setup the bind request
-            BindRequestImpl request = new BindRequestImpl( 1 );
+            BindRequestImpl request = new BindRequestImpl();
+            request.setMessageId( 1 );
             request.setName( new Dn( "uid=admin,ou=system" ) );
             request.setSimple( false );
             request.setCredentials( type1response );
@@ -649,7 +650,8 @@ public class SaslBindIT extends Abstract
             }
 
             // Setup the bind request
-            BindRequestImpl request = new BindRequestImpl( 2 );
+            BindRequestImpl request = new BindRequestImpl();
+            request.setMessageId( 2 );
             request.setName( new Dn( "uid=admin,ou=system" ) );
             request.setSimple( false );
             request.setCredentials( type3response );

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Tue Apr 12 15:18:04 2011
@@ -1571,7 +1571,8 @@ public class LdapNetworkConnection exten
         int newId = messageId.incrementAndGet();
 
         // Create the UnbindRequest
-        UnbindRequest unbindRequest = new UnbindRequestImpl( newId );
+        UnbindRequest unbindRequest = new UnbindRequestImpl();
+        unbindRequest.setMessageId( newId );
 
         LOG.debug( "-----------------------------------------------------------------" );
         LOG.debug( "Sending Unbind request \n{}", unbindRequest );
@@ -3676,7 +3677,9 @@ public class LdapNetworkConnection exten
             else
             {
                 // Copy the bindRequest without setting the credentials
-                BindRequest bindRequestCopy = new BindRequestImpl( newId );
+                BindRequest bindRequestCopy = new BindRequestImpl();
+                bindRequestCopy.setMessageId( newId );
+
                 bindRequestCopy.setName( bindRequest.getName() );
                 bindRequestCopy.setSaslMechanism( bindRequest.getSaslMechanism() );
                 bindRequestCopy.setSimple( bindRequest.isSimple() );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/abandonRequest/InitAbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/abandonRequest/InitAbandonRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/abandonRequest/InitAbandonRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/abandonRequest/InitAbandonRequest.java Tue Apr 12 15:18:04 2011
@@ -29,6 +29,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.AbandonRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.AbandonRequest;
 import org.apache.directory.shared.ldap.model.message.AbandonRequestImpl;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -66,8 +67,10 @@ public class InitAbandonRequest extends 
     public void action( LdapMessageContainer<AbandonRequestDecorator> container ) throws DecoderException
     {
         // Create the AbandonRequest LdapMessage instance and store it in the container
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl();
+        internalAbandonRequest.setMessageId( container.getMessageId() );
         AbandonRequestDecorator abandonRequest = new AbandonRequestDecorator(
-            container.getLdapCodecService(), new AbandonRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internalAbandonRequest );
         container.setMessage( abandonRequest );
 
         // The current TLV should be a integer

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/InitAddRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/InitAddRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/InitAddRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/InitAddRequest.java Tue Apr 12 15:18:04 2011
@@ -26,6 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.AddRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -60,8 +61,10 @@ public class InitAddRequest extends Gram
     {
         // Now, we can allocate the AddRequest Object
         int messageId = container.getMessageId();
+        AddRequest internalAddRequest = new AddRequestImpl();
+        internalAddRequest.setMessageId( messageId );
         AddRequestDecorator addRequest = new AddRequestDecorator(
-            container.getLdapCodecService(), new AddRequestImpl( messageId ) );
+            container.getLdapCodecService(), internalAddRequest );
         container.setMessage( addRequest );
 
         // We will check that the request is not null

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java Tue Apr 12 15:18:04 2011
@@ -26,6 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.BindRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,8 +60,10 @@ public class InitBindRequest extends Gra
     public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException
     {
         // Create the BindRequest LdapMessage instance and store it in the container
+        BindRequest internalBindRequest = new BindRequestImpl();
+        internalBindRequest.setMessageId( container.getMessageId() );
         BindRequestDecorator bindRequest = new BindRequestDecorator(
-            container.getLdapCodecService(), new BindRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internalBindRequest );
         container.setMessage( bindRequest );
 
         // We will check that the request is not null

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/compareRequest/InitCompareRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/compareRequest/InitCompareRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/compareRequest/InitCompareRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/compareRequest/InitCompareRequest.java Tue Apr 12 15:18:04 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.CompareRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.CompareRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,8 +59,10 @@ public class InitCompareRequest extends 
     public void action( LdapMessageContainer<CompareRequestDecorator> container )
     {
         // Now, we can allocate the CompareRequest Object
+        CompareRequest internalCompareRequest = new CompareRequestImpl();
+        internalCompareRequest.setMessageId( container.getMessageId() );
         CompareRequestDecorator compareRequest = new CompareRequestDecorator(
-            container.getLdapCodecService(), new CompareRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internalCompareRequest );
         container.setMessage( compareRequest );
 
         LOG.debug( "Compare Request" );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/delRequest/InitDelRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/delRequest/InitDelRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/delRequest/InitDelRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/delRequest/InitDelRequest.java Tue Apr 12 15:18:04 2011
@@ -28,6 +28,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.ResponseCarryingException;
 import org.apache.directory.shared.ldap.codec.decorators.DeleteRequestDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
 import org.apache.directory.shared.ldap.model.message.DeleteResponseImpl;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
@@ -70,8 +71,10 @@ public class InitDelRequest extends Gram
     public void action( LdapMessageContainer<DeleteRequestDecorator> container ) throws DecoderException
     {
         // Create the DeleteRequest LdapMessage instance and store it in the container
+        DeleteRequest internaldelRequest = new DeleteRequestImpl();
+        internaldelRequest.setMessageId( container.getMessageId() );
         DeleteRequestDecorator delRequest = new DeleteRequestDecorator(
-            container.getLdapCodecService(), new DeleteRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internaldelRequest );
         container.setMessage( delRequest );
 
         // And store the Dn into it

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyDnRequest/InitModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyDnRequest/InitModifyDnRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyDnRequest/InitModifyDnRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyDnRequest/InitModifyDnRequest.java Tue Apr 12 15:18:04 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.ModifyDnRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -56,8 +57,10 @@ public class InitModifyDnRequest extends
     public void action( LdapMessageContainer<ModifyDnRequestDecorator> container )
     {
         // Now, we can allocate the ModifyDNRequest Object
+        ModifyDnRequest internalModifyDnRequest = new ModifyDnRequestImpl();
+        internalModifyDnRequest.setMessageId( container.getMessageId() );
         ModifyDnRequestDecorator modifyDnRequest = new ModifyDnRequestDecorator(
-            container.getLdapCodecService(), new ModifyDnRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internalModifyDnRequest );
         container.setMessage( modifyDnRequest );
 
         LOG.debug( "ModifyDn request" );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/InitModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/InitModifyRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/InitModifyRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/InitModifyRequest.java Tue Apr 12 15:18:04 2011
@@ -52,9 +52,10 @@ public class InitModifyRequest extends G
     public void action( LdapMessageContainer<ModifyRequestDecorator> container )
     {
         // Now, we can allocate the ModifyRequest Object
-        ModifyRequest modifyRequest = new ModifyRequestImpl( container.getMessageId() );
+        ModifyRequest internalModifyRequest = new ModifyRequestImpl();
+        internalModifyRequest.setMessageId( container.getMessageId() );
         ModifyRequestDecorator modifyRequestDecorator = new ModifyRequestDecorator(
-            container.getLdapCodecService(), modifyRequest );
+            container.getLdapCodecService(), internalModifyRequest );
         container.setMessage( modifyRequestDecorator );
     }
 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchRequest/InitSearchRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchRequest/InitSearchRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchRequest/InitSearchRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchRequest/InitSearchRequest.java Tue Apr 12 15:18:04 2011
@@ -24,6 +24,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,8 +60,10 @@ public class InitSearchRequest extends G
         // Now, we can allocate the SearchRequest Object
         TLV tlv = container.getCurrentTLV();
 
+        SearchRequest internalSearchRequest = new SearchRequestImpl();
+        internalSearchRequest.setMessageId( container.getMessageId() );
         SearchRequestDecorator searchRequest = new SearchRequestDecorator(
-            container.getLdapCodecService(), new SearchRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(), internalSearchRequest );
 
         searchRequest.setTlvId( tlv.getId());
         container.setMessage( searchRequest );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/unbindRequest/InitUnbindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/unbindRequest/InitUnbindRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/unbindRequest/InitUnbindRequest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/actions/unbindRequest/InitUnbindRequest.java Tue Apr 12 15:18:04 2011
@@ -26,6 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.UnbindRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.UnbindRequest;
 import org.apache.directory.shared.ldap.model.message.UnbindRequestImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,8 +60,10 @@ public class InitUnbindRequest extends G
     public void action( LdapMessageContainer<UnbindRequestDecorator> container ) throws DecoderException
     {
         // Create the UnbindRequest LdapMessage instance and store it in the container
+        UnbindRequest unbindRequestInternal = new UnbindRequestImpl();
+        unbindRequestInternal.setMessageId( container.getMessageId() );
         UnbindRequestDecorator unbindRequest = new UnbindRequestDecorator(
-            container.getLdapCodecService(), new UnbindRequestImpl( container.getMessageId() ) );
+            container.getLdapCodecService(),unbindRequestInternal );
         container.setMessage( unbindRequest );
 
         TLV tlv = container.getCurrentTLV();

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java Tue Apr 12 15:18:04 2011
@@ -28,12 +28,10 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
@@ -47,6 +45,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
@@ -107,8 +108,8 @@ public class LdapControlTest extends Abs
         AbandonRequestDecorator abandonRequest = ldapMessageContainer.getMessage();
 
         // Copy the message
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         assertEquals( 3, abandonRequest.getMessageId() );
         assertEquals( 2, abandonRequest.getAbandoned() );

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Tue Apr 12 15:18:04 2011
@@ -26,12 +26,10 @@ import static org.junit.Assert.fail;
 
 import java.nio.ByteBuffer;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.UnbindRequestDecorator;
@@ -43,6 +41,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * A global Ldap Decoder test
@@ -314,7 +315,8 @@ public class LdapMessageTest extends Abs
         assertEquals( 500, message.getMessageId() );
 
         // Check the length
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( message.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( message.getMessageId() );
 
         try
         {

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java Tue Apr 12 15:18:04 2011
@@ -28,8 +28,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -46,6 +44,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test an AbandonRequest
@@ -113,8 +114,8 @@ public class AbandonRequestTest extends 
         AbandonRequestDecorator abandonRequest = ldapMessageContainer.getMessage();
 
         // Copy the message
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         assertEquals( 3, abandonRequest.getMessageId() );
         assertEquals( 2, abandonRequest.getAbandoned() );
@@ -221,8 +222,8 @@ public class AbandonRequestTest extends 
         assertEquals( 2, abandonRequest.getAbandoned() );
 
         // Check the length
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         // Check the encoding
         try

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java Tue Apr 12 15:18:04 2011
@@ -27,11 +27,9 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.BindRequestDecorator;
@@ -46,6 +44,9 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -177,7 +178,8 @@ public class BindRequestPerfTest extends
         for ( int i = 0; i < nbLoops; i++ )
         {
             // Check the decoded BindRequest
-            BindRequest bindRequest = new BindRequestImpl( 1 );
+            BindRequest bindRequest = new BindRequestImpl();
+            bindRequest.setMessageId( 1 );
 
             bindRequest.setSimple( true );
             bindRequest.setName( name );

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java Tue Apr 12 15:18:04 2011
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -37,11 +35,19 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.ResponseCarryingException;
 import org.apache.directory.shared.ldap.codec.decorators.DeleteRequestDecorator;
 import org.apache.directory.shared.ldap.codec.osgi.AbstractCodecServiceTest;
-import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.Control;
+import org.apache.directory.shared.ldap.model.message.DeleteRequest;
+import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
+import org.apache.directory.shared.ldap.model.message.DeleteResponseImpl;
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the DelRequest codec
@@ -97,7 +103,8 @@ public class DelRequestTest extends Abst
         assertEquals( "cn=testModify,ou=users,ou=system", delRequest.getName().toString() );
 
         // Check the length
-        DeleteRequest internalDeleteRequest = new DeleteRequestImpl( delRequest.getMessageId() );
+        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
+        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
         internalDeleteRequest.setName( delRequest.getName() );
 
         // Check the encoding
@@ -259,7 +266,8 @@ public class DelRequestTest extends Abst
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
         assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
 
-        DeleteRequest internalDeleteRequest = new DeleteRequestImpl( delRequest.getMessageId() );
+        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
+        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
         internalDeleteRequest.setName( delRequest.getName() );
         internalDeleteRequest.addControl( control );
 

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java Tue Apr 12 15:18:04 2011
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -43,6 +41,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -88,7 +89,8 @@ public class UnBindRequestTest extends A
         assertEquals( 1, unbindRequest.getMessageId() );
 
         // Check the encoding
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( unbindRequest.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );
 
         try
         {
@@ -162,7 +164,8 @@ public class UnBindRequestTest extends A
         assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( unbindRequest.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );
         internalUnbindRequest.addControl( control );
 
         try

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java Tue Apr 12 15:18:04 2011
@@ -28,12 +28,10 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
@@ -47,6 +45,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
@@ -108,8 +109,8 @@ public class LdapControlTest extends Abs
         AbandonRequestDecorator abandonRequest = ldapMessageContainer.getMessage();
 
         // Copy the message
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         assertEquals( 3, abandonRequest.getMessageId() );
         assertEquals( 2, abandonRequest.getAbandoned() );

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Tue Apr 12 15:18:04 2011
@@ -26,12 +26,10 @@ import static org.junit.Assert.fail;
 
 import java.nio.ByteBuffer;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.UnbindRequestDecorator;
@@ -43,6 +41,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * A global Ldap Decoder test
@@ -318,7 +319,8 @@ public class LdapMessageTest extends Abs
         assertEquals( 500, message.getMessageId() );
 
         // Check the length
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( message.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( message.getMessageId() );
 
         try
         {

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java Tue Apr 12 15:18:04 2011
@@ -28,8 +28,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -46,6 +44,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test an AbandonRequest
@@ -113,8 +114,8 @@ public class AbandonRequestTest extends 
         AbandonRequestDecorator abandonRequest = ldapMessageContainer.getMessage();
 
         // Copy the message
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         assertEquals( 3, abandonRequest.getMessageId() );
         assertEquals( 2, abandonRequest.getAbandoned() );
@@ -221,8 +222,8 @@ public class AbandonRequestTest extends 
         assertEquals( 2, abandonRequest.getAbandoned() );
 
         // Check the length
-        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getMessageId() );
-        internalAbandonRequest.setAbandoned( abandonRequest.getAbandoned() );
+        AbandonRequest internalAbandonRequest = new AbandonRequestImpl( abandonRequest.getAbandoned() );
+        internalAbandonRequest.setMessageId( abandonRequest.getMessageId() );
 
         // Check the encoding
         try

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java Tue Apr 12 15:18:04 2011
@@ -27,11 +27,9 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.BindRequestDecorator;
@@ -46,6 +44,9 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -176,7 +177,8 @@ public class BindRequestPerfTest extends
         for ( int i = 0; i < nbLoops; i++ )
         {
             // Check the decoded BindRequest
-            BindRequest bindRequest = new BindRequestImpl( 1 );
+            BindRequest bindRequest = new BindRequestImpl();
+            bindRequest.setMessageId( 1 );
 
             bindRequest.setSimple( true );
             bindRequest.setName( name );

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java Tue Apr 12 15:18:04 2011
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -37,11 +35,19 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.ResponseCarryingException;
 import org.apache.directory.shared.ldap.codec.decorators.DeleteRequestDecorator;
 import org.apache.directory.shared.ldap.codec.osgi.AbstractCodecServiceTest;
-import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.Control;
+import org.apache.directory.shared.ldap.model.message.DeleteRequest;
+import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
+import org.apache.directory.shared.ldap.model.message.DeleteResponseImpl;
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the DelRequest codec
@@ -97,7 +103,8 @@ public class DelRequestTest extends Abst
         assertEquals( "cn=testModify,ou=users,ou=system", delRequest.getName().toString() );
 
         // Check the length
-        DeleteRequest internalDeleteRequest = new DeleteRequestImpl( delRequest.getMessageId() );
+        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
+        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
         internalDeleteRequest.setName( delRequest.getName() );
 
         // Check the encoding
@@ -259,7 +266,8 @@ public class DelRequestTest extends Abst
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
         assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
 
-        DeleteRequest internalDeleteRequest = new DeleteRequestImpl( delRequest.getMessageId() );
+        DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
+        internalDeleteRequest.setMessageId( delRequest.getMessageId() );
         internalDeleteRequest.setName( delRequest.getName() );
         internalDeleteRequest.addControl( control );
 

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java Tue Apr 12 15:18:04 2011
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -43,6 +41,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -88,7 +89,8 @@ public class UnBindRequestTest extends A
         assertEquals( 1, unbindRequest.getMessageId() );
 
         // Check the encoding
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( unbindRequest.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );
 
         try
         {
@@ -162,7 +164,9 @@ public class UnBindRequestTest extends A
         assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
 
         // Check the encoding
-        UnbindRequest internalUnbindRequest = new UnbindRequestImpl( unbindRequest.getMessageId() );
+        UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
+        internalUnbindRequest.setMessageId( unbindRequest.getMessageId() );
+
         internalUnbindRequest.addControl( control );
 
         try

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java Tue Apr 12 15:18:04 2011
@@ -43,8 +43,7 @@ public interface AbandonRequest extends 
     /**
      * Sets the id of the request operation to terminate.
      * 
-     * @param requestId
-     *            the sequence id of the request message to abandon
+     * @param requestId the sequence id of the request message to abandon
      */
     void setAbandoned( int requestId );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -19,19 +19,16 @@
  */
 package org.apache.directory.shared.ldap.model.message;
 
-
 import org.apache.directory.shared.i18n.I18n;
 
 
 /**
- * Implementation of an AbandonRequest.
+ * Implementation of an AbandonRequest message.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class AbandonRequestImpl extends AbstractRequest implements AbandonRequest
 {
-    static final long serialVersionUID = -4688193359792740969L;
-
     /** Sequence identifier of the outstanding request message to abandon */
     private int abandonId;
 
@@ -48,11 +45,12 @@ public class AbandonRequestImpl extends 
     /**
      * Creates an AbandonRequest implementation for an outstanding request.
      * 
-     * @param id the sequence identifier of the AbandonRequest message.
+     * @param abdandonnedId the sequence identifier of the AbandonRequest message.
      */
-    public AbandonRequestImpl( final int id )
+    public AbandonRequestImpl( final int abdandonnedId )
     {
-        super( id, TYPE, false );
+        super( -1, TYPE, false );
+        abandonId = abdandonnedId;
     }
 
 
@@ -70,8 +68,7 @@ public class AbandonRequestImpl extends 
     /**
      * Sets the id of the request operation to terminate.
      * 
-     * @param abandonId
-     *            the sequence id of the request message to abandon
+     * @param abandonId the sequence id of the request message to abandon
      */
     public void setAbandoned( int abandonId )
     {
@@ -80,13 +77,22 @@ public class AbandonRequestImpl extends 
 
 
     /**
+     * RFC 2251 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations
+     * cannot be abandoned.
+     */
+    public void abandon()
+    {
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_04185 ) );
+    }
+
+
+    /**
      * Checks for equality first by asking the super method which should compare
      * all but the Abandoned request's Id. It then compares this to determine
      * equality.
      * 
-     * @param obj
-     *            the object to test for equality to this AbandonRequest
-     * @return true if the obj equals this request false otherwise
+     * @param obj the object to test for equality to this AbandonRequest
+     * @return true if the obj equals this request, false otherwise
      */
     public boolean equals( Object obj )
     {
@@ -126,16 +132,6 @@ public class AbandonRequestImpl extends 
 
 
     /**
-     * RFC 2251 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations
-     * cannot be abandoned.
-     */
-    public void abandon()
-    {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_04185 ) );
-    }
-
-
-    /**
      * Return a String representing an AbandonRequest
      * 
      * @return A String representing the AbandonRequest

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -20,10 +20,10 @@
 package org.apache.directory.shared.ldap.model.message;
 
 
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -63,18 +63,6 @@ public class AddRequestImpl extends Abst
 
 
     /**
-     * Creates an AddRequest implementation to create a new entry.
-     * 
-     * @param id the sequence identifier of the AddRequest message.
-     */
-    public AddRequestImpl( final int id )
-    {
-        super( id, TYPE );
-        entry = new DefaultEntry();
-    }
-
-
-    /**
      * Create a new attributeValue
      * 
      * @param type The attribute's name (called 'type' in the grammar)
@@ -284,7 +272,7 @@ public class AddRequestImpl extends Abst
     {
         StringBuilder sb = new StringBuilder();
 
-        sb.append( "    Add Request :\n" );
+        sb.append( "    Add Request[" ).append( getMessageId() ).append( "] :\n" );
 
         if ( entry == null )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -65,19 +65,6 @@ public class BindRequestImpl extends Abs
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
-
-    /**
-     * Creates an BindRequest implementation to bind to an LDAP server.
-     * 
-     * @param id the sequence identifier of the BindRequest message.
-     */
-    public BindRequestImpl( final int id )
-    {
-        super( id, TYPE );
-        hCredentials = 0;
-    }
-
-
     /**
      * Creates an BindRequest implementation to bind to an LDAP server.
      */

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -62,18 +62,6 @@ public class CompareRequestImpl extends 
     }
 
 
-    /**
-     * Creates an CompareRequest implementation to compare a named entry with an
-     * attribute value assertion pair.
-     * 
-     * @param id the sequence identifier of the CompareRequest message.
-     */
-    public CompareRequestImpl( final int id )
-    {
-        super( id, TYPE );
-    }
-
-
     // ------------------------------------------------------------------------
     // ComparisonRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -42,7 +42,6 @@ public class DeleteRequestImpl extends A
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
-
     /**
      * Creates a DeleteRequest implementing object used to delete a
      * leaf entry from the DIT.
@@ -53,18 +52,6 @@ public class DeleteRequestImpl extends A
     }
 
 
-    /**
-     * Creates a DeleteRequest implementing object used to delete a
-     * leaf entry from the DIT.
-     * 
-     * @param id the sequential message identifier
-     */
-    public DeleteRequestImpl( final int id )
-    {
-        super( id, TYPE );
-    }
-
-
     // ------------------------------------------------------------------------
     // DeleteRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -46,18 +46,6 @@ public class ExtendedRequestImpl extends
     }
 
 
-    /**
-     * Creates an ExtendedRequest implementing object used to perform
-     * extended protocol operation on the server.
-     * 
-     * @param id the sequential message identifier
-     */
-    public ExtendedRequestImpl( final int id )
-    {
-        super( id, TYPE, true );
-    }
-
-
     // -----------------------------------------------------------------------
     // ExtendedRequest Interface Method Implementations
     // -----------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -62,18 +62,6 @@ public class ModifyDnRequestImpl extends
     }
 
 
-    /**
-     * Creates a Lockable ModifyDnRequest implementing object used to perform a
-     * dn change on an entry potentially resulting in an entry move.
-     * 
-     * @param id the sequence id of this message
-     */
-    public ModifyDnRequestImpl( final int id )
-    {
-        super( id, TYPE );
-    }
-
-
     // -----------------------------------------------------------------------
     // ModifyDnRequest Interface Method Implementations
     // -----------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -26,9 +26,9 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -53,6 +53,9 @@ public class ModifyRequestImpl extends A
     /** The associated response */
     private ModifyResponse response;
 
+    // -----------------------------------------------------------------------
+    // Constructors
+    // -----------------------------------------------------------------------
     /**
      * Creates a ModifyRequest implementing object used to modify the
      * attributes of an entry.
@@ -63,18 +66,6 @@ public class ModifyRequestImpl extends A
     }
 
 
-    /**
-     * Creates a ModifyRequest implementing object used to modify the
-     * attributes of an entry.
-     * 
-     * @param id the sequential message identifier
-     */
-    public ModifyRequestImpl( final int id )
-    {
-        super( id, TYPE );
-    }
-
-
     // ------------------------------------------------------------------------
     // ModifyRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -71,6 +71,9 @@ public class SearchRequestImpl extends A
     private SearchResultDone response;
 
 
+    // -----------------------------------------------------------------------
+    // Constructors
+    // -----------------------------------------------------------------------
     /**
      * Creates a SearcRequest implementing object used to search the
      * DIT.
@@ -81,18 +84,6 @@ public class SearchRequestImpl extends A
     }
 
 
-    /**
-     * Creates a Lockable SearcRequest implementing object used to search the
-     * DIT.
-     * 
-     * @param id the sequential message identifier
-     */
-    public SearchRequestImpl( final int id )
-    {
-        super( id, MessageTypeEnum.SEARCH_REQUEST );
-    }
-
-
     // ------------------------------------------------------------------------
     // SearchRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java Tue Apr 12 15:18:04 2011
@@ -40,9 +40,9 @@ public class UnbindRequestImpl extends A
      * 
      * @param id the sequential message identifier.
      */
-    public UnbindRequestImpl( final int id )
+    public UnbindRequestImpl()
     {
-        super( id, TYPE, false );
+        super( -1, TYPE, false );
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java?rev=1091456&r1=1091455&r2=1091456&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java Tue Apr 12 15:18:04 2011
@@ -26,10 +26,10 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.MessageException;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -99,7 +99,8 @@ public class AddRequestImplTest
     @Test
     public void testEqualsSameObj()
     {
-        AddRequestImpl req = new AddRequestImpl( 5 );
+        AddRequestImpl req = new AddRequestImpl();
+        req.setMessageId( 5 );
         assertTrue( req.equals( req ) );
     }
 
@@ -110,11 +111,13 @@ public class AddRequestImplTest
     @Test
     public void testEqualsExactCopy() throws LdapException
     {
-        AddRequestImpl req0 = new AddRequestImpl( 5 );
+        AddRequestImpl req0 = new AddRequestImpl();
+        req0.setMessageId( 5 );
         req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
         req0.setEntry( getEntry() );
 
-        AddRequestImpl req1 = new AddRequestImpl( 5 );
+        AddRequestImpl req1 = new AddRequestImpl();
+        req1.setMessageId( 5 );
         req1.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
         req1.setEntry( getEntry() );
 
@@ -128,11 +131,13 @@ public class AddRequestImplTest
     @Test
     public void testNotEqualDiffId() throws LdapException
     {
-        AddRequestImpl req0 = new AddRequestImpl( 7 );
+        AddRequestImpl req0 = new AddRequestImpl();
+        req0.setMessageId( 7 );
         req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
         req0.setEntry( getEntry() );
 
-        AddRequestImpl req1 = new AddRequestImpl( 5 );
+        AddRequestImpl req1 = new AddRequestImpl();
+        req1.setMessageId( 5 );
         req1.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
         req1.setEntry( getEntry() );
 
@@ -146,11 +151,13 @@ public class AddRequestImplTest
     @Test
     public void testNotEqualDiffName() throws LdapException
     {
-        AddRequestImpl req0 = new AddRequestImpl( 5 );
+        AddRequestImpl req0 = new AddRequestImpl();
+        req0.setMessageId( 5 );
         req0.setEntry( getEntry() );
         req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
 
-        AddRequestImpl req1 = new AddRequestImpl( 5 );
+        AddRequestImpl req1 = new AddRequestImpl();
+        req1.setMessageId( 5 );
         req1.setEntry( getEntry() );
         req1.setEntryDn( new Dn( "cn=admin,dc=apache,dc=org" ) );
 
@@ -164,12 +171,14 @@ public class AddRequestImplTest
     @Test
     public void testNotEqualDiffAttributes() throws LdapException
     {
-        AddRequestImpl req0 = new AddRequestImpl( 5 );
+        AddRequestImpl req0 = new AddRequestImpl();
+        req0.setMessageId( 5 );
         Entry entry0 = getEntry();
         entry0.setDn( new Dn( "cn=admin,dc=apache,dc=org" ) );
         req0.setEntry( entry0 );
 
-        AddRequestImpl req1 = new AddRequestImpl( 5 );
+        AddRequestImpl req1 = new AddRequestImpl();
+        req1.setMessageId( 5 );
         req1.setEntryDn( new Dn( "cn=admin,dc=apache,dc=org" ) );
 
         assertTrue( req0.equals( req1 ) );
@@ -315,7 +324,8 @@ public class AddRequestImplTest
             }
         };
 
-        AddRequestImpl req1 = new AddRequestImpl( 5 );
+        AddRequestImpl req1 = new AddRequestImpl();
+        req1.setMessageId( 5 );
         req1.setEntry( getEntry() );
         assertTrue( req1.equals( req0 ) );
     }



Mime
View raw message