directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r985411 [10/11] - in /directory: apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/ apached...
Date Sat, 14 Aug 2010 00:22:40 GMT
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=985411&r1=985410&r2=985411&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 Sat Aug 14 00:22:38 2010
@@ -52,39 +52,20 @@ import org.apache.directory.ldap.client.
 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.AbstractMessage;
 import org.apache.directory.ldap.client.api.message.AddRequest;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.ldap.client.api.message.BindRequest;
-import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.ldap.client.api.message.CompareRequest;
-import org.apache.directory.ldap.client.api.message.CompareResponse;
 import org.apache.directory.ldap.client.api.message.DeleteRequest;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
-import org.apache.directory.ldap.client.api.message.ExtendedIntermediateResponse;
 import org.apache.directory.ldap.client.api.message.ExtendedRequest;
-import org.apache.directory.ldap.client.api.message.ExtendedResponse;
-import org.apache.directory.ldap.client.api.message.IntermediateResponse;
-import org.apache.directory.ldap.client.api.message.LdapResult;
 import org.apache.directory.ldap.client.api.message.ModifyDnRequest;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
-import org.apache.directory.ldap.client.api.message.Referral;
-import org.apache.directory.ldap.client.api.message.Response;
-import org.apache.directory.ldap.client.api.message.SearchIntermediateResponse;
 import org.apache.directory.ldap.client.api.message.SearchRequest;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-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.ldap.client.api.protocol.LdapProtocolCodecFactory;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.LdapResultCodec;
 import org.apache.directory.shared.ldap.codec.LdapTransformer;
 import org.apache.directory.shared.ldap.codec.MessageEncoderException;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
@@ -116,6 +97,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.IntermediateResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
@@ -124,11 +106,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalIntermediateResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.internal.InternalMessage;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResultDone;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResultReference;
@@ -143,7 +124,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.schema.registries.ObjectClassRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.filterchain.IoFilter;
 import org.apache.mina.core.future.CloseFuture;
@@ -202,7 +182,7 @@ public class LdapNetworkConnection exten
     private AtomicInteger messageId;
 
     /** a map to hold the ResponseFutures for all operations */
-    private Map<Integer, ResponseFuture<? extends Response>> futureMap = new ConcurrentHashMap<Integer, ResponseFuture<? extends Response>>();
+    private Map<Integer, ResponseFuture<? extends InternalResponse>> futureMap = new ConcurrentHashMap<Integer, ResponseFuture<? extends InternalResponse>>();
 
     /** list of controls supported by the server */
     private List<String> supportedControls;
@@ -274,16 +254,16 @@ public class LdapNetworkConnection exten
     }
 
 
-    private void addToFutureMap( int messageId, ResponseFuture<? extends Response> future )
+    private void addToFutureMap( int messageId, ResponseFuture<? extends InternalResponse> future )
     {
         LOG.debug( "Adding <" + messageId + ", " + future.getClass().getName() + ">" );
         futureMap.put( messageId, future );
     }
 
 
-    private ResponseFuture<? extends Response> getFromFutureMap( int messageId )
+    private ResponseFuture<? extends InternalResponse> getFromFutureMap( int messageId )
     {
-        ResponseFuture<? extends Response> future = futureMap.remove( messageId );
+        ResponseFuture<? extends InternalResponse> future = futureMap.remove( messageId );
 
         if ( future != null )
         {
@@ -294,9 +274,9 @@ public class LdapNetworkConnection exten
     }
 
 
-    private ResponseFuture<? extends Response> peekFromFutureMap( int messageId )
+    private ResponseFuture<? extends InternalResponse> peekFromFutureMap( int messageId )
     {
-        ResponseFuture<? extends Response> future = futureMap.get( messageId );
+        ResponseFuture<? extends InternalResponse> future = futureMap.get( messageId );
 
         // future can be null if there was a abandon operation on that messageId
         if ( future != null )
@@ -360,180 +340,6 @@ public class LdapNetworkConnection exten
     }
 
 
-    /**
-     * Convert a BindResponseCodec to a BindResponse message
-     */
-    private BindResponse convert( InternalBindResponse internalBindResponse )
-    {
-        BindResponse bindResponse = new BindResponse();
-
-        bindResponse.setMessageId( internalBindResponse.getMessageId() );
-        bindResponse.setServerSaslCreds( internalBindResponse.getServerSaslCreds() );
-        bindResponse.setLdapResult( convert( internalBindResponse.getLdapResult() ) );
-        addControls( internalBindResponse, bindResponse );
-
-        return bindResponse;
-    }
-
-
-    /**
-     * Convert a IntermediateResponseCodec to a IntermediateResponse message based on the ResponseFuture's type
-     */
-    private void setIntermediateResponse( InternalIntermediateResponse internalIntermediateResponse,
-        ResponseFuture responseFuture ) throws Exception
-    {
-        IntermediateResponse intermediateResponse = null;
-
-        if ( responseFuture instanceof SearchFuture )
-        {
-            intermediateResponse = new SearchIntermediateResponse();
-            addControls( internalIntermediateResponse, ( SearchIntermediateResponse ) intermediateResponse );
-        }
-        else if ( responseFuture instanceof ExtendedFuture )
-        {
-            intermediateResponse = new ExtendedIntermediateResponse();
-            addControls( internalIntermediateResponse, ( ExtendedIntermediateResponse ) intermediateResponse );
-        }
-        else
-        {
-            // currently we only support IR for search and extended operations
-            throw new UnsupportedOperationException( "Unknown ResponseFuture type "
-                + responseFuture.getClass().getName() );
-        }
-
-        intermediateResponse.setResponseName( internalIntermediateResponse.getResponseName() );
-        intermediateResponse.setResponseValue( internalIntermediateResponse.getResponseValue() );
-
-        responseFuture.set( intermediateResponse );
-    }
-
-
-    /**
-     * Convert a LdapResultCodec to a LdapResult message
-     */
-    private LdapResult convert( LdapResultCodec ldapResultCodec )
-    {
-        LdapResult ldapResult = new LdapResult();
-
-        ldapResult.setErrorMessage( ldapResultCodec.getErrorMessage() );
-        ldapResult.setMatchedDn( ldapResultCodec.getMatchedDN() );
-
-        // Loop on the referrals
-        Referral referral = new Referral();
-
-        if ( ldapResultCodec.getReferrals() != null )
-        {
-            for ( LdapURL url : ldapResultCodec.getReferrals() )
-            {
-                referral.addLdapUrls( url );
-            }
-        }
-
-        ldapResult.setReferral( referral );
-        ldapResult.setResultCode( ldapResultCodec.getResultCode() );
-
-        return ldapResult;
-    }
-
-
-    /**
-     * Convert a LdapResultCodec to a LdapResult message
-     */
-    private LdapResult convert( InternalLdapResult internalLdapResult )
-    {
-        LdapResult ldapResult = new LdapResult();
-
-        ldapResult.setErrorMessage( internalLdapResult.getErrorMessage() );
-        ldapResult.setMatchedDn( internalLdapResult.getMatchedDn().getName() );
-
-        // Loop on the referrals
-        Referral referral = new Referral();
-
-        if ( internalLdapResult.getReferral() != null )
-        {
-            Collection<String> ldapUrls = internalLdapResult.getReferral().getLdapUrls();
-
-            for ( String url : ldapUrls )
-            {
-                referral.addLdapUrls( url );
-            }
-        }
-
-        ldapResult.setReferral( referral );
-        ldapResult.setResultCode( internalLdapResult.getResultCode() );
-
-        return ldapResult;
-    }
-
-
-    /**
-     * Convert a SearchResultDoneImpl to a SearchResultDone message
-     */
-    private SearchResultDone convert( InternalSearchResultDone internalSearchResultDone )
-    {
-        SearchResultDone searchResultDone = new SearchResultDone();
-
-        searchResultDone.setMessageId( internalSearchResultDone.getMessageId() );
-        searchResultDone.setLdapResult( convert( internalSearchResultDone.getLdapResult() ) );
-        addControls( internalSearchResultDone, searchResultDone );
-
-        return searchResultDone;
-    }
-
-
-    /**
-     * Convert an InternalSearchResultEntry to a SearchResultEntry message
-     */
-    private SearchResultEntry convert( InternalSearchResultEntry internalSearchResultEntry )
-    {
-        SearchResultEntry searchResultEntry = new SearchResultEntry();
-
-        searchResultEntry.setMessageId( internalSearchResultEntry.getMessageId() );
-
-        if ( schemaManager != null )
-        {
-            searchResultEntry.setEntry( new DefaultEntry( schemaManager, internalSearchResultEntry.getEntry() ) );
-        }
-        else
-        {
-            searchResultEntry.setEntry( internalSearchResultEntry.getEntry() );
-        }
-
-        addControls( internalSearchResultEntry, searchResultEntry );
-
-        return searchResultEntry;
-    }
-
-
-    /**
-     * Convert a SearchResultReference to a SearchResultReference message
-     */
-    private SearchResultReference convert( InternalSearchResultReference internalSearchEntryReference )
-    {
-        SearchResultReference searchResultReference = new SearchResultReference();
-
-        searchResultReference.setMessageId( internalSearchEntryReference.getMessageId() );
-
-        // Loop on the referrals
-        Referral referral = new Referral();
-
-        InternalReferral internalReferral = internalSearchEntryReference.getReferral();
-
-        if ( internalReferral != null )
-        {
-            for ( String url : referral.getLdapUrls() )
-            {
-                referral.addLdapUrls( url );
-            }
-        }
-
-        searchResultReference.setReferral( referral );
-        addControls( internalSearchEntryReference, searchResultReference );
-
-        return searchResultReference;
-    }
-
-
     //------------------------- The constructors --------------------------//
     /**
      * Create a new instance of a LdapConnection on localhost,
@@ -766,7 +572,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public AddResponse add( Entry entry ) throws LdapException
+    public InternalAddResponse add( Entry entry ) throws LdapException
     {
         if ( entry == null )
         {
@@ -798,7 +604,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public AddResponse add( AddRequest addRequest ) throws LdapException
+    public InternalAddResponse add( AddRequest addRequest ) throws LdapException
     {
         AddFuture addFuture = addAsync( addRequest );
 
@@ -809,7 +615,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( addRequest.getTimeout() );
 
             // Get the response, blocking
-            AddResponse addResponse = addFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalAddResponse addResponse = addFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( addResponse == null )
             {
@@ -899,21 +705,6 @@ public class LdapNetworkConnection exten
     }
 
 
-    /**
-     * converts the AddResponseCodec to AddResponse.
-     */
-    private AddResponse convert( InternalAddResponse internalAddResponse )
-    {
-        AddResponse addResponse = new AddResponse();
-
-        addResponse.setMessageId( internalAddResponse.getMessageId() );
-        addResponse.setLdapResult( convert( internalAddResponse.getLdapResult() ) );
-        addControls( internalAddResponse, addResponse );
-
-        return addResponse;
-    }
-
-
     //------------------------ The LDAP operations ------------------------//
 
     /**
@@ -965,7 +756,7 @@ public class LdapNetworkConnection exten
         // remove the associated listener if any
         int abandonId = abandonRequest.getAbandonedMessageId();
 
-        ResponseFuture<? extends Response> rf = getFromFutureMap( abandonId );
+        ResponseFuture<? extends InternalResponse> rf = getFromFutureMap( abandonId );
 
         // if the listener is not null, this is a async operation and no need to
         // send cancel signal on future, sending so will leave a dangling poision object in the corresponding queue
@@ -989,7 +780,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind() throws LdapException, IOException
+    public InternalBindResponse bind() throws LdapException, IOException
     {
         LOG.debug( "Anonymous Bind request" );
 
@@ -1021,7 +812,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( String name, String credentials ) throws LdapException, IOException
+    public InternalBindResponse bind( String name, String credentials ) throws LdapException, IOException
     {
         LOG.debug( "Bind request : {}", name );
 
@@ -1053,7 +844,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( DN name, String credentials ) throws LdapException, IOException
+    public InternalBindResponse bind( DN name, String credentials ) throws LdapException, IOException
     {
         LOG.debug( "Bind request : {}", name );
 
@@ -1101,7 +892,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( BindRequest bindRequest ) throws LdapException, IOException
+    public InternalBindResponse bind( BindRequest bindRequest ) throws LdapException, IOException
     {
         BindFuture bindFuture = bindAsync( bindRequest );
 
@@ -1112,7 +903,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( bindRequest.getTimeout() );
 
             // Get the response, blocking
-            BindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalBindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( bindResponse == null )
             {
@@ -1359,7 +1150,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( DN baseDn, String filter, SearchScope scope, String... attributes )
+    public Cursor<InternalResponse> search( DN baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         if ( baseDn == null )
@@ -1385,7 +1176,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( String baseDn, String filter, SearchScope scope, String... attributes )
+    public Cursor<InternalResponse> search( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         return search( new DN( baseDn ), filter, scope, attributes );
@@ -1467,7 +1258,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( SearchRequest searchRequest ) throws LdapException
+    public Cursor<InternalResponse> search( SearchRequest searchRequest ) throws LdapException
     {
         SearchFuture searchFuture = searchAsync( searchRequest );
 
@@ -1584,7 +1375,7 @@ public class LdapNetworkConnection exten
 
         // this check is necessary to prevent adding an abandoned operation's
         // result(s) to corresponding queue
-        ResponseFuture<? extends Response> responseFuture = peekFromFutureMap( messageId );
+        ResponseFuture<? extends InternalResponse> responseFuture = peekFromFutureMap( messageId );
 
         if ( responseFuture == null )
         {
@@ -1596,7 +1387,7 @@ public class LdapNetworkConnection exten
         {
             case ADD_RESPONSE:
                 // Transform the response
-                AddResponse addResponse = convert( ( InternalAddResponse ) response );
+                InternalAddResponse addResponse = ( InternalAddResponse ) response;
 
                 AddFuture addFuture = ( AddFuture ) responseFuture;
 
@@ -1631,7 +1422,7 @@ public class LdapNetworkConnection exten
 
             case BIND_RESPONSE:
                 // Transform the response
-                BindResponse bindResponse = convert( ( InternalBindResponse ) response );
+                InternalBindResponse bindResponse = ( InternalBindResponse ) response;
 
                 BindFuture bindFuture = ( BindFuture ) responseFuture;
 
@@ -1665,7 +1456,7 @@ public class LdapNetworkConnection exten
 
             case COMPARE_RESPONSE:
                 // Transform the response
-                CompareResponse compareResponse = convert( ( InternalCompareResponse ) response );
+                InternalCompareResponse compareResponse = ( InternalCompareResponse ) response;
 
                 CompareFuture compareFuture = ( CompareFuture ) responseFuture;
 
@@ -1700,7 +1491,7 @@ public class LdapNetworkConnection exten
 
             case DEL_RESPONSE:
                 // Transform the response
-                DeleteResponse deleteResponse = convert( ( InternalDeleteResponse ) response );
+                InternalDeleteResponse deleteResponse = ( InternalDeleteResponse ) response;
 
                 DeleteFuture deleteFuture = ( DeleteFuture ) responseFuture;
 
@@ -1734,7 +1525,7 @@ public class LdapNetworkConnection exten
 
             case EXTENDED_RESPONSE:
                 // Transform the response
-                ExtendedResponse extendedResponse = convert( ( InternalExtendedResponse ) response );
+                InternalExtendedResponse extendedResponse = ( InternalExtendedResponse ) response;
 
                 ExtendedFuture extendedFuture = ( ExtendedFuture ) responseFuture;
 
@@ -1768,13 +1559,36 @@ public class LdapNetworkConnection exten
                 break;
 
             case INTERMEDIATE_RESPONSE:
-                setIntermediateResponse( ( InternalIntermediateResponse ) response, responseFuture );
+                InternalIntermediateResponse intermediateResponse = null;
+
+                if ( responseFuture instanceof SearchFuture )
+                {
+                    intermediateResponse = new IntermediateResponseImpl( messageId );
+                    addControls( intermediateResponse, ( InternalIntermediateResponse ) response );
+                    ( ( SearchFuture ) responseFuture ).set( intermediateResponse );
+                }
+                else if ( responseFuture instanceof ExtendedFuture )
+                {
+                    intermediateResponse = new IntermediateResponseImpl( messageId );
+                    addControls( intermediateResponse, ( InternalIntermediateResponse ) response );
+                    ( ( ExtendedFuture ) responseFuture ).set( intermediateResponse );
+                }
+                else
+                {
+                    // currently we only support IR for search and extended operations
+                    throw new UnsupportedOperationException( "Unknown ResponseFuture type "
+                        + responseFuture.getClass().getName() );
+                }
+
+                intermediateResponse.setResponseName( ( ( InternalIntermediateResponse ) response ).getResponseName() );
+                intermediateResponse
+                    .setResponseValue( ( ( InternalIntermediateResponse ) response ).getResponseValue() );
 
                 break;
 
             case MODIFY_RESPONSE:
                 // Transform the response
-                ModifyResponse modifyResponse = convert( ( InternalModifyResponse ) response );
+                InternalModifyResponse modifyResponse = ( InternalModifyResponse ) response;
 
                 ModifyFuture modifyFuture = ( ModifyFuture ) responseFuture;
 
@@ -1808,7 +1622,7 @@ public class LdapNetworkConnection exten
 
             case MODIFYDN_RESPONSE:
                 // Transform the response
-                ModifyDnResponse modifyDnResponse = convert( ( InternalModifyDnResponse ) response );
+                InternalModifyDnResponse modifyDnResponse = ( InternalModifyDnResponse ) response;
 
                 ModifyDnFuture modifyDnFuture = ( ModifyDnFuture ) responseFuture;
 
@@ -1842,7 +1656,7 @@ public class LdapNetworkConnection exten
 
             case SEARCH_RESULT_DONE:
                 // Store the response into the responseQueue
-                SearchResultDone searchResultDone = convert( ( InternalSearchResultDone ) response );
+                InternalSearchResultDone searchResultDone = ( InternalSearchResultDone ) response;
 
                 SearchFuture searchFuture = ( SearchFuture ) responseFuture;
 
@@ -1876,7 +1690,12 @@ public class LdapNetworkConnection exten
 
             case SEARCH_RESULT_ENTRY:
                 // Store the response into the responseQueue
-                SearchResultEntry searchResultEntry = convert( ( InternalSearchResultEntry ) response );
+                InternalSearchResultEntry searchResultEntry = ( InternalSearchResultEntry ) response;
+
+                if ( schemaManager != null )
+                {
+                    searchResultEntry.setEntry( new DefaultEntry( schemaManager, searchResultEntry.getEntry() ) );
+                }
 
                 searchFuture = ( SearchFuture ) responseFuture;
 
@@ -1898,7 +1717,7 @@ public class LdapNetworkConnection exten
 
             case SEARCH_RESULT_REFERENCE:
                 // Store the response into the responseQueue
-                SearchResultReference searchResultReference = convert( ( InternalSearchResultReference ) response );
+                InternalSearchResultReference searchResultReference = ( InternalSearchResultReference ) response;
 
                 searchFuture = ( SearchFuture ) responseFuture;
 
@@ -1925,7 +1744,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( Entry entry, ModificationOperation modOp ) throws LdapException
+    public InternalModifyResponse modify( Entry entry, ModificationOperation modOp ) throws LdapException
     {
         if ( entry == null )
         {
@@ -1948,7 +1767,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( DN dn, Modification... modifications ) throws LdapException
+    public InternalModifyResponse modify( DN dn, Modification... modifications ) throws LdapException
     {
         if ( dn == null )
         {
@@ -1966,7 +1785,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( String dn, Modification... modifications ) throws LdapException
+    public InternalModifyResponse modify( String dn, Modification... modifications ) throws LdapException
     {
         return modify( new DN( dn ), modifications );
     }
@@ -1975,7 +1794,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
+    public InternalModifyResponse modify( ModifyRequest modRequest ) throws LdapException
     {
         ModifyFuture modifyFuture = modifyAsync( modRequest );
 
@@ -1986,7 +1805,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( modRequest.getTimeout() );
 
             // Get the response, blocking
-            ModifyResponse modifyResponse = modifyFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalModifyResponse modifyResponse = modifyFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( modifyResponse == null )
             {
@@ -2079,7 +1898,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( String entryDn, String newRdn ) throws LdapException
+    public InternalModifyDnResponse rename( String entryDn, String newRdn ) throws LdapException
     {
         return rename( entryDn, newRdn, true );
     }
@@ -2088,7 +1907,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( DN entryDn, RDN newRdn ) throws LdapException
+    public InternalModifyDnResponse rename( DN entryDn, RDN newRdn ) throws LdapException
     {
         return rename( entryDn, newRdn, true );
     }
@@ -2097,7 +1916,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
     {
         try
         {
@@ -2114,7 +1933,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( DN entryDn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse rename( DN entryDn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         ModifyDnRequest modDnRequest = new ModifyDnRequest();
         modDnRequest.setEntryDn( entryDn );
@@ -2128,7 +1947,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse move( String entryDn, String newSuperiorDn ) throws LdapException
+    public InternalModifyDnResponse move( String entryDn, String newSuperiorDn ) throws LdapException
     {
         try
         {
@@ -2145,7 +1964,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse move( DN entryDn, DN newSuperiorDn ) throws LdapException
+    public InternalModifyDnResponse move( DN entryDn, DN newSuperiorDn ) throws LdapException
     {
         ModifyDnRequest modDnRequest = new ModifyDnRequest();
         modDnRequest.setEntryDn( entryDn );
@@ -2163,7 +1982,7 @@ public class LdapNetworkConnection exten
      *
      * @see #moveAndRename(DN, DN, boolean)
      */
-    public ModifyDnResponse moveAndRename( DN entryDn, DN newDn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( DN entryDn, DN newDn ) throws LdapException
     {
         return moveAndRename( entryDn, newDn, true );
     }
@@ -2174,7 +1993,7 @@ public class LdapNetworkConnection exten
      *
      * @see #moveAndRename(DN, DN, boolean)
      */
-    public ModifyDnResponse moveAndRename( String entryDn, String newDn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( String entryDn, String newDn ) throws LdapException
     {
         return moveAndRename( new DN( entryDn ), new DN( newDn ), true );
     }
@@ -2187,7 +2006,7 @@ public class LdapNetworkConnection exten
      * @param newDn The new Entry DN
      * @param deleteOldRdn Tells if the old RDN must be removed
      */
-    public ModifyDnResponse moveAndRename( DN entryDn, DN newDn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( DN entryDn, DN newDn, boolean deleteOldRdn ) throws LdapException
     {
         // Check the parameters first
         if ( entryDn == null )
@@ -2228,7 +2047,8 @@ public class LdapNetworkConnection exten
      * @param newDn The new Entry DN
      * @param deleteOldRdn Tells if the old RDN must be removed
      */
-    public ModifyDnResponse moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( String entryDn, String newDn, boolean deleteOldRdn )
+        throws LdapException
     {
         return moveAndRename( new DN( entryDn ), new DN( newDn ), true );
     }
@@ -2237,7 +2057,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
+    public InternalModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
     {
         ModifyDnFuture modifyDnFuture = modifyDnAsync( modDnRequest );
 
@@ -2248,7 +2068,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( modDnRequest.getTimeout() );
 
             // Get the response, blocking
-            ModifyDnResponse modifyDnResponse = modifyDnFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalModifyDnResponse modifyDnResponse = modifyDnFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( modifyDnResponse == null )
             {
@@ -2343,7 +2163,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( String dn ) throws LdapException
+    public InternalDeleteResponse delete( String dn ) throws LdapException
     {
         return delete( new DN( dn ) );
     }
@@ -2352,7 +2172,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( DN dn ) throws LdapException
+    public InternalDeleteResponse delete( DN dn ) throws LdapException
     {
         DeleteRequest deleteRequest = new DeleteRequest( dn );
 
@@ -2367,7 +2187,7 @@ public class LdapNetworkConnection exten
      * @return operation's response
      * @throws LdapException If the DN is not valid or if the deletion failed
      */
-    public DeleteResponse deleteTree( DN dn ) throws LdapException
+    public InternalDeleteResponse deleteTree( DN dn ) throws LdapException
     {
         String treeDeleteOid = "1.2.840.113556.1.4.805";
 
@@ -2394,7 +2214,7 @@ public class LdapNetworkConnection exten
      * @return operation's response
      * @throws LdapException If the DN is not valid or if the deletion failed
      */
-    public DeleteResponse deleteTree( String dn ) throws LdapException
+    public InternalDeleteResponse deleteTree( String dn ) throws LdapException
     {
         try
         {
@@ -2454,18 +2274,18 @@ public class LdapNetworkConnection exten
      * @param listener  the delete operation response listener
      * @throws LdapException If the DN is not valid or if the deletion failed
      */
-    private DeleteResponse deleteRecursive( DN dn, Map<DN, Cursor<SearchResponse>> cursorMap, DeleteListener listener )
-        throws LdapException
+    private InternalDeleteResponse deleteRecursive( DN dn, Map<DN, Cursor<InternalResponse>> cursorMap,
+        DeleteListener listener ) throws LdapException
     {
         LOG.debug( "searching for {}", dn.getName() );
-        DeleteResponse delResponse = null;
-        Cursor<SearchResponse> cursor = null;
+        InternalDeleteResponse delResponse = null;
+        Cursor<InternalResponse> cursor = null;
 
         try
         {
             if ( cursorMap == null )
             {
-                cursorMap = new HashMap<DN, Cursor<SearchResponse>>();
+                cursorMap = new HashMap<DN, Cursor<InternalResponse>>();
             }
 
             cursor = cursorMap.get( dn );
@@ -2488,11 +2308,11 @@ public class LdapNetworkConnection exten
             {
                 do
                 {
-                    SearchResponse searchResp = cursor.get();
+                    InternalResponse searchResp = cursor.get();
 
-                    if ( searchResp instanceof SearchResultEntry )
+                    if ( searchResp instanceof InternalSearchResultEntry )
                     {
-                        SearchResultEntry searchResult = ( SearchResultEntry ) searchResp;
+                        InternalSearchResultEntry searchResult = ( InternalSearchResultEntry ) searchResp;
                         deleteRecursive( searchResult.getEntry().getDn(), cursorMap, listener );
                     }
                 }
@@ -2518,7 +2338,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
+    public InternalDeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
     {
         DeleteFuture deleteFuture = deleteAsync( deleteRequest );
 
@@ -2529,7 +2349,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( deleteRequest.getTimeout() );
 
             // Get the response, blocking
-            DeleteResponse delResponse = deleteFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalDeleteResponse delResponse = deleteFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( delResponse == null )
             {
@@ -2621,7 +2441,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, String value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, String value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -2630,7 +2450,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, byte[] value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, byte[] value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -2639,7 +2459,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, Value<?> value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, Value<?> value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -2648,7 +2468,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, String value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, String value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -2662,7 +2482,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, byte[] value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, byte[] value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -2676,7 +2496,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, Value<?> value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, Value<?> value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -2690,7 +2510,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
+    public InternalCompareResponse compare( CompareRequest compareRequest ) throws LdapException
     {
         CompareFuture compareFuture = compareAsync( compareRequest );
 
@@ -2701,7 +2521,7 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( compareRequest.getTimeout() );
 
             // Get the response, blocking
-            CompareResponse compareResponse = compareFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalCompareResponse compareResponse = compareFuture.get( timeout, TimeUnit.MILLISECONDS );
 
             if ( compareResponse == null )
             {
@@ -2793,69 +2613,9 @@ public class LdapNetworkConnection exten
 
 
     /**
-     * converts the InternalCompareResponse to CompareResponse object.
-     */
-    private CompareResponse convert( InternalCompareResponse internalCompareResponse )
-    {
-        CompareResponse response = new CompareResponse();
-
-        response.setMessageId( internalCompareResponse.getMessageId() );
-        response.setLdapResult( convert( internalCompareResponse.getLdapResult() ) );
-        addControls( internalCompareResponse, response );
-
-        return response;
-    }
-
-
-    /**
-     * converts the InternalDeleteResponse to DeleteResponse object.
-     */
-    private DeleteResponse convert( InternalDeleteResponse internalDeleteResponse )
-    {
-        DeleteResponse response = new DeleteResponse();
-
-        response.setMessageId( internalDeleteResponse.getMessageId() );
-        response.setLdapResult( convert( internalDeleteResponse.getLdapResult() ) );
-        addControls( internalDeleteResponse, response );
-
-        return response;
-    }
-
-
-    /**
-     * converts the InternalModifyResponse to ModifyResponse object.
-     */
-    private ModifyResponse convert( InternalModifyResponse internalModifyResponse )
-    {
-        ModifyResponse response = new ModifyResponse();
-
-        response.setMessageId( internalModifyResponse.getMessageId() );
-        response.setLdapResult( convert( internalModifyResponse.getLdapResult() ) );
-        addControls( internalModifyResponse, response );
-
-        return response;
-    }
-
-
-    /**
-     * converts the InternalModifyDnResponse to ModifyDnResponse object.
-     */
-    private ModifyDnResponse convert( InternalModifyDnResponse internalModifyDnResponse )
-    {
-        ModifyDnResponse response = new ModifyDnResponse();
-
-        response.setMessageId( internalModifyDnResponse.getMessageId() );
-        response.setLdapResult( convert( internalModifyDnResponse.getLdapResult() ) );
-        addControls( internalModifyDnResponse, response );
-
-        return response;
-    }
-
-
-    /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( String oid ) throws LdapException
+    public InternalExtendedResponse extended( String oid ) throws LdapException
     {
         return extended( oid, null );
     }
@@ -2864,7 +2624,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
+    public InternalExtendedResponse extended( String oid, byte[] value ) throws LdapException
     {
         try
         {
@@ -2882,7 +2642,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( OID oid ) throws LdapException
+    public InternalExtendedResponse extended( OID oid ) throws LdapException
     {
         return extended( oid, null );
     }
@@ -2891,7 +2651,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( OID oid, byte[] value ) throws LdapException
+    public InternalExtendedResponse extended( OID oid, byte[] value ) throws LdapException
     {
         ExtendedRequest extRequest = new ExtendedRequest( oid );
         extRequest.setValue( value );
@@ -2903,7 +2663,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
+    public InternalExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
     {
         ExtendedFuture extendedFuture = extendedAsync( extendedRequest );
 
@@ -2914,7 +2674,8 @@ public class LdapNetworkConnection exten
             long timeout = getTimeout( extendedRequest.getTimeout() );
 
             // Get the response, blocking
-            ExtendedResponse extendedResponse = extendedFuture.get( timeout, TimeUnit.MILLISECONDS );
+            InternalExtendedResponse extendedResponse = ( InternalExtendedResponse ) extendedFuture.get( timeout,
+                TimeUnit.MILLISECONDS );
 
             if ( extendedResponse == null )
             {
@@ -3007,7 +2768,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( DN dn ) throws LdapException
+    public InternalResponse lookup( DN dn ) throws LdapException
     {
         return lookup( dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
     }
@@ -3016,7 +2777,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( String dn ) throws LdapException
+    public InternalResponse lookup( String dn ) throws LdapException
     {
         return lookup( dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
     }
@@ -3025,13 +2786,13 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( DN dn, String... attributes ) throws LdapException
+    public InternalResponse lookup( DN dn, String... attributes ) throws LdapException
     {
-        SearchResponse resp = null;
+        InternalResponse resp = null;
 
         try
         {
-            Cursor<SearchResponse> cursor = search( dn, "(objectClass=*)", SearchScope.OBJECT, attributes );
+            Cursor<InternalResponse> cursor = search( dn, "(objectClass=*)", SearchScope.OBJECT, attributes );
 
             // Read the response
             if ( cursor.next() )
@@ -3058,45 +2819,13 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( String dn, String... attributes ) throws LdapException
+    public InternalResponse lookup( String dn, String... attributes ) throws LdapException
     {
         return lookup( new DN( dn ), attributes );
     }
 
 
     /**
-     * converts the InternalExtendedResponse to ExtendedResponse.
-     */
-    private ExtendedResponse convert( InternalExtendedResponse internalExtendedResponse )
-    {
-        ExtendedResponse extResponse = new ExtendedResponse();
-
-        OID oid = null;
-        try
-        {
-            if ( internalExtendedResponse.getID() != null )
-            {
-                oid = new OID( internalExtendedResponse.getID() );
-            }
-        }
-        catch ( DecoderException e )
-        {
-            // can happen in case of a PROTOCOL_ERROR result, ignore
-            //LOG.error( "invalid response name {}", extRespCodec.getResponseName() );
-        }
-
-        extResponse.setOid( oid );
-        extResponse.setValue( internalExtendedResponse.getEncodedValue() );
-        extResponse.setMessageId( internalExtendedResponse.getMessageId() );
-        extResponse.setLdapResult( convert( internalExtendedResponse.getLdapResult() ) );
-
-        addControls( internalExtendedResponse, extResponse );
-
-        return extResponse;
-    }
-
-
-    /**
      * {@inheritDoc}
      */
     public boolean isControlSupported( String controlOID ) throws LdapException
@@ -3240,12 +2969,12 @@ public class LdapNetworkConnection exten
      */
     private void fetchRootDSE() throws LdapException
     {
-        Cursor<SearchResponse> cursor = null;
+        Cursor<InternalResponse> cursor = null;
         try
         {
             cursor = search( "", "(objectClass=*)", SearchScope.OBJECT, "*", "+" );
             cursor.next();
-            SearchResultEntry searchRes = ( SearchResultEntry ) cursor.get();
+            InternalSearchResultEntry searchRes = ( InternalSearchResultEntry ) cursor.get();
 
             rootDSE = searchRes.getEntry();
         }
@@ -3283,30 +3012,7 @@ public class LdapNetworkConnection exten
     }
 
 
-    private void addControls( LdapMessageCodec codec, AbstractMessage message )
-    {
-        List<Control> ccList = codec.getControls();
-        if ( ccList != null )
-        {
-            for ( Control cc : ccList )
-            {
-                // FIXME why the cc is coming as null!?
-                if ( cc == null )
-                {
-                    continue;
-                }
-
-                Control control = new ControlImpl( cc.getOid() );
-                control.setValue( cc.getValue() );
-                control.setCritical( cc.isCritical() );
-
-                message.add( control );
-            }
-        }
-    }
-
-
-    private void addControls( InternalMessage codec, AbstractMessage message )
+    private void addControls( InternalMessage codec, InternalMessage message )
     {
         Map<String, Control> controls = codec.getControls();
 

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.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/SearchCursor.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java Sat Aug 14 00:22:38 2010
@@ -24,11 +24,11 @@ package org.apache.directory.ldap.client
 import java.util.concurrent.TimeUnit;
 
 import org.apache.directory.ldap.client.api.future.SearchFuture;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultDone;
 import org.apache.directory.shared.ldap.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultDone;
 
 
 /**
@@ -51,13 +51,14 @@ public class SearchCursor extends Abstra
     private TimeUnit timeUnit;
 
     /** a reference to hold the retrieved SearchResponse object from SearchFuture */
-    private SearchResponse response;
+    private InternalResponse response;
 
     private boolean done;
 
     /** a reference to hold the SearchResultDone response */
-    private SearchResultDone searchDoneResp;
-    
+    private InternalSearchResultDone searchDoneResp;
+
+
     public SearchCursor( SearchFuture future, long timeout, TimeUnit timeUnit )
     {
         this.future = future;
@@ -72,7 +73,7 @@ public class SearchCursor extends Abstra
         {
             return false;
         }
-        
+
         try
         {
             if ( future.isCancelled() )
@@ -81,7 +82,7 @@ public class SearchCursor extends Abstra
                 done = true;
                 return false;
             }
-            
+
             response = future.get( timeout, timeUnit );
         }
         catch ( Exception e )
@@ -97,7 +98,7 @@ public class SearchCursor extends Abstra
 
             // close the cursor
             close( ldapException );
-            
+
             throw ldapException;
         }
 
@@ -108,11 +109,11 @@ public class SearchCursor extends Abstra
             throw new LdapException( LdapNetworkConnection.TIME_OUT_ERROR );
         }
 
-        done = ( response instanceof SearchResultDone );
+        done = ( response instanceof InternalSearchResultDone );
 
         if ( done )
         {
-            searchDoneResp = ( SearchResultDone ) response;
+            searchDoneResp = ( InternalSearchResultDone ) response;
             response = null;
         }
 
@@ -120,7 +121,7 @@ public class SearchCursor extends Abstra
     }
 
 
-    public SearchResponse get() throws Exception
+    public InternalResponse get() throws Exception
     {
         if ( !available() )
         {
@@ -136,12 +137,12 @@ public class SearchCursor extends Abstra
      * 
      * @return the SearchResultDone message, null if the search operation fails for any reason 
      */
-    public SearchResultDone getSearchDone()
+    public InternalSearchResultDone getSearchDone()
     {
         return searchDoneResp;
     }
-    
-    
+
+
     public boolean isElementReused()
     {
         return true;
@@ -169,7 +170,7 @@ public class SearchCursor extends Abstra
             super.close();
             return;
         }
-        
+
         if ( !future.isCancelled() )
         {
             future.cancel( true );

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.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/future/AddFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java Sat Aug 14 00:22:38 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.AddResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
+
 
 /**
  * A Future to manage AddRequests
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddFuture extends ResponseFuture<AddResponse>
+public class AddFuture extends ResponseFuture<InternalAddResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class AddFuture extends ResponseF
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the AddResponse, blocking until one is received.
      * 
      * @return The AddResponse
      */
-    public AddResponse get() throws InterruptedException, ExecutionException
+    public InternalAddResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the AddResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class AddFuture extends ResponseF
      * @param unit The TimeUnit
      * @return The AddResponse The AddResponse found
      */
-    public AddResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalAddResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "AddFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.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/future/BindFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java Sat Aug 14 00:22:38 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.BindResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
+
 
 /**
  * A Future to manage BindRequests
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindFuture extends ResponseFuture<BindResponse>
+public class BindFuture extends ResponseFuture<InternalBindResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class BindFuture extends Response
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the BindResponse, blocking until one is received.
      * 
      * @return The BindResponse
      */
-    public BindResponse get() throws InterruptedException, ExecutionException
+    public InternalBindResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the BindResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class BindFuture extends Response
      * @param unit The TimeUnit
      * @return The BindResponse The BindResponse found
      */
-    public BindResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalBindResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         return super.get( timeout, unit );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "BindFuture" ).append( super.toString() );
-        
+
         return sb.toString();
     }
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.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/future/CompareFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java Sat Aug 14 00:22:38 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.CompareResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalCompareResponse;
+
 
 /**
  * A Future to manage CompareRequest
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareFuture extends ResponseFuture<CompareResponse>
+public class CompareFuture extends ResponseFuture<InternalCompareResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class CompareFuture extends Respo
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the CompareResponse, blocking until one is received.
      * 
      * @return The CompareResponse
      */
-    public CompareResponse get() throws InterruptedException, ExecutionException
+    public InternalCompareResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the CompareResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class CompareFuture extends Respo
      * @param unit The TimeUnit
      * @return The CompareResponse The CompareResponse found
      */
-    public CompareResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalCompareResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.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/future/DeleteFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java Sat Aug 14 00:22:38 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.DeleteResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
+
 
 /**
  * A Future to manage DelRequests
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteFuture extends ResponseFuture<DeleteResponse>
+public class DeleteFuture extends ResponseFuture<InternalDeleteResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class DeleteFuture extends Respon
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the DeleteResponse, blocking until one is received.
      * 
      * @return The DeleteResponse
      */
-    public DeleteResponse get() throws InterruptedException, ExecutionException
+    public InternalDeleteResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the DeleteResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class DeleteFuture extends Respon
      * @param unit The TimeUnit
      * @return The DeleteResponse The DeleteResponse found
      */
-    public DeleteResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalDeleteResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.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/future/ExtendedFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java Sat Aug 14 00:22:38 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.internal.InternalResponse;
+
 
 /**
  * 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<InternalResponse>
 {
-   /**
-    *
-    * 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 InternalResponse 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 InternalResponse 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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.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/future/ModifyDnFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java Sat Aug 14 00:22:38 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.ModifyDnResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
+
 
 /**
  * A Future to manage ModifyDnRequest
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnFuture extends ResponseFuture<ModifyDnResponse>
+public class ModifyDnFuture extends ResponseFuture<InternalModifyDnResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class ModifyDnFuture extends Resp
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the ModifyDnResponse, blocking until one is received.
      * 
      * @return The ModifyDnResponse
      */
-    public ModifyDnResponse get() throws InterruptedException, ExecutionException
+    public InternalModifyDnResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the ModifyDnResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class ModifyDnFuture extends Resp
      * @param unit The TimeUnit
      * @return The ModifyDnResponse The ModifyDnResponse found
      */
-    public ModifyDnResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalModifyDnResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.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/future/ModifyFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java Sat Aug 14 00:22:38 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.ModifyResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
+
 
 /**
  * A Future to manage ModifyRequest
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyFuture extends ResponseFuture<ModifyResponse>
+public class ModifyFuture extends ResponseFuture<InternalModifyResponse>
 {
     /**
      * 
@@ -44,19 +46,19 @@ public class ModifyFuture extends Respon
     {
         super( connection, messageId );
     }
-    
-    
+
+
     /**
      * Get the ModifyResponse, blocking until one is received.
      * 
      * @return The ModifyResponse
      */
-    public ModifyResponse get() throws InterruptedException, ExecutionException
+    public InternalModifyResponse get() throws InterruptedException, ExecutionException
     {
         return super.get();
     }
 
-    
+
     /**
      * Get the ModifyResponse, blocking until one is received, or until the
      * given timeout is reached.
@@ -65,22 +67,22 @@ public class ModifyFuture extends Respon
      * @param unit The TimeUnit
      * @return The ModifyResponse The ModifyResponse found
      */
-    public ModifyResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
+    public InternalModifyResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
         TimeoutException
     {
         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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.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/future/SearchFuture.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java Sat Aug 14 00:22:38 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.internal.InternalResponse;
+
 
 /**
  * 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<InternalResponse>
 {
     /**
      * 
@@ -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 InternalResponse 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 InternalResponse 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/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.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/listener/AddListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java Sat Aug 14 00:22:38 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.internal.InternalAddResponse;
+
 
 /**
  * interface used for invoking the callback after completing the add operation.
@@ -38,5 +40,5 @@ public interface AddListener extends Ope
      * @param response the add operation's response
      * @throws LdapException
      */
-    public void entryAdded( LdapAsyncConnection connection, AddResponse response ) throws LdapException;
+    public void entryAdded( LdapAsyncConnection connection, InternalAddResponse response ) throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.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/listener/BindListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java Sat Aug 14 00:22:38 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.internal.InternalBindResponse;
+
 
 /**
  * A listener used for asynchronous bind handling. When wanting to handle
@@ -39,5 +41,5 @@ public interface BindListener extends Op
      * @param connection
      * @param BindResponseCodec The bind response
      */
-    void bindCompleted( LdapAsyncConnection connection, BindResponse bindResponse ) throws LdapException;
+    void bindCompleted( LdapAsyncConnection connection, InternalBindResponse bindResponse ) throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.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/listener/CompareListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java Sat Aug 14 00:22:38 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.internal.InternalCompareResponse;
+
 
 /**
  * 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, InternalCompareResponse response )
+        throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.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/listener/DeleteListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java Sat Aug 14 00:22:38 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.internal.InternalDeleteResponse;
+
 
 /**
  * interface used for invoking the callback after completing the delete operation.
@@ -38,5 +40,5 @@ public interface DeleteListener extends 
      * @param response the delete operation's response
      * @throws LdapException
      */
-    public void entryDeleted( LdapAsyncConnection connection, DeleteResponse response ) throws LdapException;
+    public void entryDeleted( LdapAsyncConnection connection, InternalDeleteResponse response ) throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.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/listener/ExtendedListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java Sat Aug 14 00:22:38 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.internal.InternalExtendedResponse;
+
 
 /**
  * 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, InternalExtendedResponse response )
+        throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.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/listener/ModifyDnListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java Sat Aug 14 00:22:38 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.internal.InternalModifyDnResponse;
+
 
 /**
  * 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, InternalModifyDnResponse response )
+        throws LdapException;
 }

Modified: directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.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/listener/ModifyListener.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java (original)
+++ directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java Sat Aug 14 00:22:38 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.internal.InternalModifyResponse;
+
 
 /**
  * interface used for invoking the callback after completing the modify operation.
@@ -39,5 +41,5 @@ public interface ModifyListener extends 
      * @param response the modify operation's response
      * @throws LdapException
      */
-    public void modifyCompleted( LdapAsyncConnection connection, ModifyResponse response ) throws LdapException;
+    public void modifyCompleted( LdapAsyncConnection connection, InternalModifyResponse response ) throws LdapException;
 }



Mime
View raw message