directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987607 [3/3] - in /directory/clients/ldap/trunk: ./ ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/ ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ ldap-client-api/src/main/java/org/apache/dir...
Date Fri, 20 Aug 2010 19:25:19 GMT
Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+
 
 /**
  * A Future to manage CompareRequest
@@ -44,8 +46,8 @@ public class CompareFuture extends Respo
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the CompareResponse, blocking until one is received.
      * 
@@ -56,7 +58,7 @@ public class CompareFuture extends Respo
         return super.get();
     }
 
-    
+
     /**
      * Get the CompareResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -70,17 +72,17 @@ public class CompareFuture extends Respo
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "CompareFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+
 
 /**
  * A Future to manage DelRequests
@@ -44,8 +46,8 @@ public class DeleteFuture extends Respon
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the DeleteResponse, blocking until one is received.
      * 
@@ -56,7 +58,7 @@ public class DeleteFuture extends Respon
         return super.get();
     }
 
-    
+
     /**
      * Get the DeleteResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -70,17 +72,17 @@ public class DeleteFuture extends Respon
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "DeleteFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,67 +19,68 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.Response;
+
 
 /**
  * A Future to manage ExtendedRequests
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedFuture extends ResponseFuture<ExtendedResponse>
+public class ExtendedFuture extends ResponseFuture<Response>
 {
-   /**
-    *
-    * Creates a new instance of ExtendedFuture.
-    *
-    */
-   public ExtendedFuture( LdapConnection connection, int messageId )
-   {
-       super( connection, messageId );
-   }
-
-
-   /**
-    * Get the ExtendedResponse, blocking until one is received.
-    *
-    * @return The ExtendedResponse
-    */
-   public ExtendedResponse get() throws InterruptedException, ExecutionException
-   {
-       return super.get();
-   }
-
-
-   /**
-    * Get the ExtendedResponse, blocking until one is received, or until the
-    * given timeout is reached.
-    *
-    * @param timeout Number of TimeUnit to wait
-    * @param unit The TimeUnit
-    * @return The ExtendedResponse The ExtendedResponse found
-    */
-   public ExtendedResponse get( long timeout, TimeUnit unit ) throws InterruptedException,
ExecutionException,
-       TimeoutException
-   {
-       return super.get( timeout, unit );
-   }
-
-
-   /**
-    * {@inheritDoc}
-    */
-   public String toString()
-   {
-       StringBuilder sb = new StringBuilder();
+    /**
+     *
+     * Creates a new instance of ExtendedFuture.
+     *
+     */
+    public ExtendedFuture( LdapConnection connection, int messageId )
+    {
+        super( connection, messageId );
+    }
+
+
+    /**
+     * Get the ExtendedResponse, blocking until one is received.
+     *
+     * @return The ExtendedResponse
+     */
+    public Response get() throws InterruptedException, ExecutionException
+    {
+        return super.get();
+    }
+
+
+    /**
+     * Get the ExtendedResponse, blocking until one is received, or until the
+     * given timeout is reached.
+     *
+     * @param timeout Number of TimeUnit to wait
+     * @param unit The TimeUnit
+     * @return The ExtendedResponse The ExtendedResponse found
+     */
+    public Response get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+        TimeoutException
+    {
+        return super.get( timeout, unit );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
 
-       sb.append( "ExtendedFuture" ).append( super.toString() );
+        sb.append( "ExtendedFuture" ).append( super.toString() );
 
-       return sb.toString();
-   }
+        return sb.toString();
+    }
 }
-

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
+
 
 /**
  * A Future to manage ModifyDnRequest
@@ -44,8 +46,8 @@ public class ModifyDnFuture extends Resp
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the ModifyDnResponse, blocking until one is received.
      * 
@@ -56,7 +58,7 @@ public class ModifyDnFuture extends Resp
         return super.get();
     }
 
-    
+
     /**
      * Get the ModifyDnResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -70,17 +72,17 @@ public class ModifyDnFuture extends Resp
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "ModifyDnFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
+
 
 /**
  * A Future to manage ModifyRequest
@@ -44,8 +46,8 @@ public class ModifyFuture extends Respon
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the ModifyResponse, blocking until one is received.
      * 
@@ -56,7 +58,7 @@ public class ModifyFuture extends Respon
         return super.get();
     }
 
-    
+
     /**
      * Get the ModifyResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -70,17 +72,17 @@ public class ModifyFuture extends Respon
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "ModifyFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java
Fri Aug 20 19:25:18 2010
@@ -40,19 +40,20 @@ public class ResponseFuture<R> implement
 {
     /** the blocking queue holding LDAP responses */
     protected BlockingQueue<R> queue;
-    
+
     /** flag to determine if this future is cancelled */
     protected boolean cancelled = false;
-    
+
     /** If the request has been cancelled because of an exception  it will be stored here
*/
     protected Throwable cause;
 
     /** The messageID for this future */
     protected int messageId;
-    
+
     /** The connection used by the request */
     protected LdapConnection connection;
-    
+
+
     /**
      * Creates a new instance of ResponseFuture.
      *
@@ -76,20 +77,20 @@ public class ResponseFuture<R> implement
         {
             return cancelled;
         }
-        
+
         // set the cancel flag first
         cancelled = true;
 
         // Send an abandonRequest only if this future exists
-        if( connection.doesFutureExistFor( messageId ) )
+        if ( connection.doesFutureExistFor( messageId ) )
         {
             connection.abandon( messageId );
         }
-        
+
         // then clear the queue, cause the might be some incoming messages before this abandon
request
         // hits the server
         queue.clear();
-        
+
         return cancelled;
     }
 
@@ -101,9 +102,9 @@ public class ResponseFuture<R> implement
     public R get() throws InterruptedException, ExecutionException
     {
         R response = null;
- 
+
         response = queue.take();
-        
+
         return response;
     }
 
@@ -122,11 +123,10 @@ public class ResponseFuture<R> implement
      * {@inheritDoc}
      * @throws InterruptedException if the operation has been cancelled by client
      */
-    public R get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
-        TimeoutException
+    public R get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
TimeoutException
     {
         R response = queue.poll( timeout, unit );
-    
+
         return response;
     }
 
@@ -165,16 +165,16 @@ public class ResponseFuture<R> implement
     {
         this.cause = cause;
     }
-    
-    
+
+
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
-        sb.append( "[msgId : " ).append( messageId ).append( ", ");
+
+        sb.append( "[msgId : " ).append( messageId ).append( ", " );
         sb.append( "size : " ).append( queue.size() ).append( ", " );
         sb.append( "Canceled :" ).append( cancelled ).append( "]" );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
Fri Aug 20 19:25:18 2010
@@ -19,19 +19,21 @@
  */
 package org.apache.directory.ldap.client.api.future;
 
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
+import org.apache.directory.shared.ldap.message.Response;
+
 
 /**
  * A Future to manage SerachRequest
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchFuture extends ResponseFuture<SearchResponse>
+public class SearchFuture extends ResponseFuture<Response>
 {
     /**
      * 
@@ -44,8 +46,8 @@ public class SearchFuture extends Respon
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the SearchResponse, blocking until one is received.
      * It can be either a SearchResultEntry, a SearchResultReference
@@ -53,12 +55,12 @@ public class SearchFuture extends Respon
      * 
      * @return The SearchResponse
      */
-    public SearchResponse get() throws InterruptedException, ExecutionException
+    public Response get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the SearchResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -67,22 +69,22 @@ public class SearchFuture extends Respon
      * @param unit The TimeUnit
      * @return The SearchResponse The SearchResponse found
      */
-    public SearchResponse get( long timeout, TimeUnit unit ) throws InterruptedException,
ExecutionException,
+    public Response get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
-        return super.get( timeout, unit );        
+        return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "SearchFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.AddResponse;
+
 
 /**
  * interface used for invoking the callback after completing the add operation.

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java
Fri Aug 20 19:25:18 2010
@@ -19,9 +19,11 @@
  */
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.BindResponse;
+
 
 /**
  * A listener used for asynchronous bind handling. When wanting to handle

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.CompareResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+
 
 /**
  * interface used for invoking the callback after completing the compare operation.
@@ -38,5 +40,6 @@ public interface CompareListener extends
      * @param response the compare operation's response
      * @throws LdapException
      */
-    public void attributeCompared( LdapAsyncConnection connection, CompareResponse response
) throws LdapException;
+    public void attributeCompared( LdapAsyncConnection connection, CompareResponse response
)
+        throws LdapException;
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+
 
 /**
  * interface used for invoking the callback after completing the delete operation.

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+
 
 /**
  * interface used for invoking the callback after completing the extended operation.
@@ -38,5 +40,6 @@ public interface ExtendedListener extend
      * @param response the extended operation's response
      * @throws LdapException
      */
-    public void extendedOperationCompleted( LdapAsyncConnection connection, ExtendedResponse
response ) throws LdapException;
+    public void extendedOperationCompleted( LdapAsyncConnection connection, ExtendedResponse
response )
+        throws LdapException;
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/IntermediateResponseListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/IntermediateResponseListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/IntermediateResponseListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/IntermediateResponseListener.java
Fri Aug 20 19:25:18 2010
@@ -19,8 +19,10 @@
  */
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.IntermediateResponse;
+import org.apache.directory.shared.ldap.message.IntermediateResponse;
+
 
 /**
  * A listener used for asynchronous IntermediateResponse handling. 

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
+
 
 /**
  * interface used for invoking the callback after completing the modifyDN operation.
@@ -39,5 +41,6 @@ public interface ModifyDnListener extend
      * @param response the modifyDn operation's response
      * @throws LdapException
      */
-    public void modifyDnCompleted( LdapAsyncConnection connection, ModifyDnResponse response
) throws LdapException;
+    public void modifyDnCompleted( LdapAsyncConnection connection, ModifyDnResponse response
)
+        throws LdapException;
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java
Fri Aug 20 19:25:18 2010
@@ -20,9 +20,11 @@
 
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
+
 
 /**
  * interface used for invoking the callback after completing the modify operation.

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/SearchListener.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/SearchListener.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/SearchListener.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/SearchListener.java
Fri Aug 20 19:25:18 2010
@@ -19,11 +19,12 @@
  */
 package org.apache.directory.ldap.client.api.listener;
 
+
 import org.apache.directory.ldap.client.api.LdapAsyncConnection;
-import org.apache.directory.ldap.client.api.message.SearchResultDone;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
-import org.apache.directory.ldap.client.api.message.SearchResultReference;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.SearchResultDone;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultReference;
 
 
 /**
@@ -43,17 +44,18 @@ public interface SearchListener extends 
      * @param searchResultEntry The found entry
      */
     void entryFound( LdapAsyncConnection connection, SearchResultEntry searchResultEntry
) throws LdapException;
-    
-    
+
+
     /**
      * A callback method for each referral returned by a search operation.
      *
      * @param connection The LdapConnection
      * @param searchResultReference The referral message
      */
-    void referralFound( LdapAsyncConnection connection, SearchResultReference searchResultReference
) throws LdapException;
+    void referralFound( LdapAsyncConnection connection, SearchResultReference searchResultReference
)
+        throws LdapException;
+
 
-    
     /**
      * A callback method called when the search is done.
      * 

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolCodecFactory.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolCodecFactory.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolCodecFactory.java
Fri Aug 20 19:25:18 2010
@@ -19,11 +19,14 @@
  */
 package org.apache.directory.ldap.client.api.protocol;
 
+
+import org.apache.directory.shared.ldap.message.LdapProtocolEncoder;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
 
+
 /**
  * 
  * The factory used to create the LDAP encoder and decoder.
@@ -32,13 +35,13 @@ import org.apache.mina.filter.codec.Prot
  */
 public class LdapProtocolCodecFactory implements ProtocolCodecFactory
 {
-    /** The Ldap encoder */
-    private ProtocolEncoder ldapEncoder;
-    
-    /** The Ldap decoder */
-    private ProtocolDecoder ldapDecoder;
+    /** The LdapDecoder key */
+    public static final String LDAP_DECODER = "LDAP_DECODER";
+
+    /** The LdapEncoder key */
+    public static final String LDAP_ENCODER = "LDAP_ENCODER";
+
 
-    
     /**
      * 
      * Creates a new instance of LdapProtocolCodecFactory. It
@@ -47,26 +50,23 @@ public class LdapProtocolCodecFactory im
      */
     public LdapProtocolCodecFactory()
     {
-        // Create the encoder.
-        ldapEncoder = new LdapProtocolEncoder();
-        ldapDecoder = new LdapProtocolDecoder();
     }
-    
-    
+
+
     /**
      * Get the Ldap decoder. 
      */
     public ProtocolDecoder getDecoder( IoSession session ) throws Exception
     {
-        return ldapDecoder;
+        return new LdapProtocolDecoder();
     }
-    
+
 
     /**
      * Get the Ldap encoder.
      */
     public ProtocolEncoder getEncoder( IoSession session ) throws Exception
     {
-        return ldapEncoder;
-    }    
+        return new LdapProtocolEncoder();
+    }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java?rev=987607&r1=987606&r2=987607&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java
Fri Aug 20 19:25:18 2010
@@ -19,14 +19,15 @@
  */
 package org.apache.directory.ldap.client.api.protocol;
 
+
 import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
 import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.message.Message;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.apache.mina.core.session.IoSession;
@@ -35,6 +36,7 @@ import org.apache.mina.filter.codec.Prot
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * 
  * A LDAP message decoder. It is based on shared-ldap decoder.
@@ -45,10 +47,11 @@ public class LdapProtocolDecoder impleme
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( LdapProtocolDecoder.class
);
-    
+
     /** A speedup for logger */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
+
     /**
      * Decode a Ldap request and write it to the remote server.
      * 
@@ -61,49 +64,42 @@ public class LdapProtocolDecoder impleme
     {
         // Allocate a LdapMessage Container
         Asn1Decoder ldapDecoder = new Asn1Decoder();
-        IAsn1Container ldapMessageContainer = (LdapMessageContainer)session.getAttribute(
"LDAP-Container" );
+        IAsn1Container ldapMessageContainer = ( LdapMessageContainer ) session.getAttribute(
"LDAP-Container" );
         ByteBuffer buf = buffer.buf();
         int currentPos = 0;
-        
+
         while ( buf.hasRemaining() )
         {
             try
             {
                 ldapDecoder.decode( buf, ldapMessageContainer );
-    
+
                 if ( IS_DEBUG )
                 {
                     LOG.debug( "Decoding the PDU : " );
                     int pos = buf.position();
-                    
-                    byte[] b = new byte[pos-currentPos];
-                    
-                    System.arraycopy( buf.array(), currentPos, b, 0, pos-currentPos );
+
+                    byte[] b = new byte[pos - currentPos];
+
+                    System.arraycopy( buf.array(), currentPos, b, 0, pos - currentPos );
                     currentPos = pos;
                     System.out.println( "Received buffer : " + StringTools.dumpBytes( b )
);
                 }
-                
+
                 if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
                     // get back the decoded message
-                    LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer
).getLdapMessage();
-                    
+                    Message message = ( ( LdapMessageContainer ) ldapMessageContainer ).getMessage();
+
                     if ( IS_DEBUG )
                     {
-                        LOG.debug( "Decoded LdapMessage : " + 
-                                ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage()
);
+                        LOG.debug( "Decoded LdapMessage : " + message );
                         buf.mark();
                     }
-    
+
                     // Clean the container for the next decoding
-                    ( ( LdapMessageContainer ) ldapMessageContainer).clean();
-                    
-                    if( IS_DEBUG )
-                    {
-//                        LOG.debug( "######################Decoded message : " + message
);
-//                        LOG.debug( "####################################################"
);
-                    }
-                    
+                    ( ( LdapMessageContainer ) ldapMessageContainer ).clean();
+
                     // Send back the message
                     out.write( message );
                 }
@@ -111,21 +107,21 @@ public class LdapProtocolDecoder impleme
             catch ( DecoderException de )
             {
                 buf.clear();
-                ( ( LdapMessageContainer ) ldapMessageContainer).clean();
+                ( ( LdapMessageContainer ) ldapMessageContainer ).clean();
                 throw de;
             }
         }
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void finishDecode( IoSession session, ProtocolDecoderOutput out ) throws Exception
     {
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message