directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r985698 - in /directory: apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/ clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/ clien...
Date Sun, 15 Aug 2010 16:03:28 GMT
Author: elecharny
Date: Sun Aug 15 16:03:28 2010
New Revision: 985698

URL: http://svn.apache.org/viewvc?rev=985698&view=rev
Log:
o Merged the AbandonRequest classes

Removed:
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbandonRequest.java
Modified:
    directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java

Modified: directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=985698&r1=985697&r2=985698&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
(original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
Sun Aug 15 16:03:28 2010
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AbandonRequest;
 import org.apache.directory.ldap.client.api.message.AddRequest;
 import org.apache.directory.ldap.client.api.message.CompareRequest;
 import org.apache.directory.ldap.client.api.message.ExtendedRequest;
@@ -73,6 +72,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.CompareResponse;
 import org.apache.directory.shared.ldap.message.internal.DeleteResponse;
 import org.apache.directory.shared.ldap.message.internal.ExtendedResponse;
+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;
@@ -1005,7 +1005,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public void abandon( AbandonRequest abandonRequest )
+    public void abandon( InternalAbandonRequest abandonRequest )
     {
         throw new UnsupportedOperationException( "abandon operation is not supported" );
     }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=985698&r1=985697&r2=985698&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
(original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Sun Aug 15 16:03:28 2010
@@ -4,7 +4,6 @@ package org.apache.directory.ldap.client
 import java.io.IOException;
 import java.util.List;
 
-import org.apache.directory.ldap.client.api.message.AbandonRequest;
 import org.apache.directory.ldap.client.api.message.AddRequest;
 import org.apache.directory.ldap.client.api.message.CompareRequest;
 import org.apache.directory.ldap.client.api.message.ExtendedRequest;
@@ -24,6 +23,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.CompareResponse;
 import org.apache.directory.shared.ldap.message.internal.DeleteResponse;
 import org.apache.directory.shared.ldap.message.internal.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.internal.ModifyDnResponse;
@@ -114,7 +114,7 @@ public interface LdapConnection
      *
      * @param abandonRequest the abandon operation's request
      */
-    public abstract void abandon( AbandonRequest abandonRequest );
+    public abstract void abandon( InternalAbandonRequest abandonRequest );
 
 
     /**

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=985698&r1=985697&r2=985698&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Sun Aug 15 16:03:28 2010
@@ -51,7 +51,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.ResponseFuture;
 import org.apache.directory.ldap.client.api.future.SearchFuture;
 import org.apache.directory.ldap.client.api.listener.DeleteListener;
-import org.apache.directory.ldap.client.api.message.AbandonRequest;
 import org.apache.directory.ldap.client.api.message.AddRequest;
 import org.apache.directory.ldap.client.api.message.CompareRequest;
 import org.apache.directory.ldap.client.api.message.ExtendedRequest;
@@ -731,8 +730,8 @@ public class LdapNetworkConnection exten
      */
     public void abandon( int messageId )
     {
-        AbandonRequest abandonRequest = new AbandonRequest();
-        abandonRequest.setAbandonedMessageId( messageId );
+        InternalAbandonRequest abandonRequest = new AbandonRequestImpl();
+        abandonRequest.setAbandoned( messageId );
 
         abandonInternal( abandonRequest );
     }
@@ -741,7 +740,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public void abandon( AbandonRequest abandonRequest )
+    public void abandon( InternalAbandonRequest abandonRequest )
     {
         abandonInternal( abandonRequest );
     }
@@ -750,30 +749,22 @@ public class LdapNetworkConnection exten
     /**
      * Internal AbandonRequest handling
      */
-    private void abandonInternal( AbandonRequest abandonRequest )
+    private void abandonInternal( InternalAbandonRequest abandonRequest )
     {
         // Todo : The Abandon messageID is always 0
         int newId = messageId.incrementAndGet();
 
-        // Create the inner abandonRequest
-        InternalAbandonRequest request = new AbandonRequestImpl( newId );
-
-        abandonRequest.setMessageId( newId );
-
-        // Inject the data into the request
-        request.setAbandoned( abandonRequest.getAbandonedMessageId() );
-
         // Inject the controls
-        setControls( abandonRequest.getControls(), request );
+        setControls( abandonRequest.getControls(), abandonRequest );
 
         LOG.debug( "-----------------------------------------------------------------" );
-        LOG.debug( "Sending request \n{}", request );
+        LOG.debug( "Sending request \n{}", abandonRequest );
 
         // Send the request to the server
-        ldapSession.write( request );
+        ldapSession.write( abandonRequest );
 
         // remove the associated listener if any
-        int abandonId = abandonRequest.getAbandonedMessageId();
+        int abandonId = abandonRequest.getAbandoned();
 
         ResponseFuture<? extends Response> rf = getFromFutureMap( abandonId );
 

Modified: directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java?rev=985698&r1=985697&r2=985698&view=diff
==============================================================================
--- directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
(original)
+++ directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
Sun Aug 15 16:03:28 2010
@@ -40,9 +40,17 @@ public class AbandonRequestImpl extends 
 
     /**
      * Creates an AbandonRequest implementation for an outstanding request.
+     */
+    public AbandonRequestImpl()
+    {
+        super( -1, TYPE, false );
+    }
+
+
+    /**
+     * Creates an AbandonRequest implementation for an outstanding request.
      * 
-     * @param id
-     *            the sequence identifier of the AbandonRequest message.
+     * @param id the sequence identifier of the AbandonRequest message.
      */
     public AbandonRequestImpl( final int id )
     {



Mime
View raw message