Author: pamarcelot
Date: Wed Oct 27 14:42:33 2010
New Revision: 1027982
URL: http://svn.apache.org/viewvc?rev=1027982&view=rev
Log:
Fix for DIRAPI-35 (LdapConnection.search(...) methods should return a SearchCursor instead
of a Cursor object in order to allow access to the SearchCursor.getSearchResultDone() method).
Added:
directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
- copied, changed from r1027850, directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/cursor/SearchCursor.java
Removed:
directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java
Modified:
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java?rev=1027982&r1=1027981&r2=1027982&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
Wed Oct 27 14:42:33 2010
@@ -27,6 +27,8 @@ import org.apache.directory.server.core.
import org.apache.directory.shared.i18n.I18n;
import org.apache.directory.shared.ldap.cursor.ClosureMonitor;
import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
+import org.apache.directory.shared.ldap.message.Response;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.message.SearchResultDone;
import org.apache.directory.shared.ldap.message.SearchResultDoneImpl;
@@ -40,10 +42,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class EntryToResponseCursor<InternalResponse> implements Cursor<InternalResponse>
+public class EntryToResponseCursor implements SearchCursor
{
/** the underlying cursor */
- private Cursor<InternalResponse> wrapped;
+ private Cursor<ClonedServerEntry> wrapped;
/** a reference to hold the SearchResultDone response */
private SearchResultDone searchDoneResp;
@@ -53,20 +55,20 @@ public class EntryToResponseCursor<Inter
private int messageId;
- public EntryToResponseCursor( int messageId, Cursor<InternalResponse> wrapped )
+ public EntryToResponseCursor( int messageId, Cursor<ClonedServerEntry> wrapped
)
{
this.wrapped = wrapped;
this.messageId = messageId;
}
- public Iterator<InternalResponse> iterator()
+ public Iterator<Response> iterator()
{
throw new UnsupportedOperationException();
}
- public void after( InternalResponse resp ) throws Exception
+ public void after( Response resp ) throws Exception
{
throw new UnsupportedOperationException();
}
@@ -84,7 +86,7 @@ public class EntryToResponseCursor<Inter
}
- public void before( InternalResponse resp ) throws Exception
+ public void before( Response resp ) throws Exception
{
throw new UnsupportedOperationException();
}
@@ -114,13 +116,13 @@ public class EntryToResponseCursor<Inter
}
- public InternalResponse get() throws Exception
+ public Response get() throws Exception
{
ClonedServerEntry entry = ( ClonedServerEntry ) wrapped.get();
SearchResultEntry se = new SearchResultEntryImpl( messageId );
se.setEntry( entry );
- return ( InternalResponse ) se;
+ return se;
}
@@ -129,7 +131,7 @@ public class EntryToResponseCursor<Inter
*
* @return the SearchResultDone message, null if the search operation fails for any reason
*/
- public SearchResultDone getSearchDone()
+ public SearchResultDone getSearchResultDone()
{
return searchDoneResp;
}
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1027982&r1=1027981&r2=1027982&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
Wed Oct 27 14:42:33 2010
@@ -28,12 +28,13 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.directory.ldap.client.api.LdapConnection;
+import org.apache.directory.server.core.entry.ClonedServerEntry;
import org.apache.directory.server.core.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.interceptor.context.BindOperationContext;
import org.apache.directory.shared.asn1.primitives.OID;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.cursor.Cursor;
import org.apache.directory.shared.ldap.cursor.EmptyCursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
import org.apache.directory.shared.ldap.entry.DefaultModification;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -74,7 +75,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
import org.apache.directory.shared.ldap.message.ModifyResponse;
import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
-import org.apache.directory.shared.ldap.message.Response;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.message.ResultResponseRequest;
import org.apache.directory.shared.ldap.message.SearchRequest;
@@ -958,7 +958,7 @@ public class LdapCoreSessionConnection i
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( SearchRequest searchRequest ) throws LdapException
+ public SearchCursor search( SearchRequest searchRequest ) throws LdapException
{
if ( searchRequest == null )
{
@@ -984,14 +984,14 @@ public class LdapCoreSessionConnection i
LOG.warn( e.getMessage(), e );
}
- return new EntryToResponseCursor<Response>( -1, new EmptyCursor<Response>()
);
+ return new EntryToResponseCursor( -1, new EmptyCursor<ClonedServerEntry>()
);
}
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( DN baseDn, String filter, SearchScope scope, String...
attributes )
+ public SearchCursor search( DN baseDn, String filter, SearchScope scope, String... attributes
)
throws LdapException
{
if ( baseDn == null )
@@ -1016,7 +1016,7 @@ public class LdapCoreSessionConnection i
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( String baseDn, String filter, SearchScope scope,
String... attributes )
+ public SearchCursor search( String baseDn, String filter, SearchScope scope, String...
attributes )
throws LdapException
{
return search( new DN( baseDn ), filter, scope, attributes );
Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=1027982&r1=1027981&r2=1027982&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
Wed Oct 27 14:42:33 2010
@@ -29,7 +29,6 @@ import java.util.concurrent.TimeUnit;
import org.apache.directory.ldap.client.api.LdapAsyncConnection;
import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.ldap.client.api.SearchCursor;
import org.apache.directory.ldap.client.api.future.SearchFuture;
import org.apache.directory.server.annotations.CreateLdapServer;
import org.apache.directory.server.annotations.CreateTransport;
@@ -37,6 +36,7 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -67,12 +67,19 @@ import org.junit.runner.RunWith;
"cn: user1",
// alias to the above entry
- "dn: cn=user1-alias,ou=users,ou=system", "objectClass: alias", "objectClass: top",
- "objectClass: extensibleObject", "aliasedObjectName: cn=user1,ou=users,ou=system",
"cn: user1-alias",
+ "dn: cn=user1-alias,ou=users,ou=system",
+ "objectClass: alias",
+ "objectClass: top",
+ "objectClass: extensibleObject",
+ "aliasedObjectName: cn=user1,ou=users,ou=system",
+ "cn: user1-alias",
// Another user
- "dn: cn=elecharny,ou=users,ou=system", "objectClass: person", "objectClass: top",
- "sn:: RW1tYW51ZWwgTMOpY2hhcm55", "cn: elecharny"
+ "dn: cn=elecharny,ou=users,ou=system",
+ "objectClass: person",
+ "objectClass: top",
+ "sn:: RW1tYW51ZWwgTMOpY2hhcm55",
+ "cn: elecharny"
})
public class ClientSearchRequestTest extends AbstractLdapTestUnit
@@ -112,7 +119,8 @@ public class ClientSearchRequestTest ext
@Test
public void testSearch() throws Exception
{
- SearchCursor cursor = ( SearchCursor ) connection.search( "ou=system", "(objectclass=*)",
SearchScope.ONELEVEL,
+ SearchCursor cursor = connection.search( "ou=system", "(objectclass=*)",
+ SearchScope.ONELEVEL,
"*", "+" );
int count = 0;
while ( cursor.next() )
@@ -121,7 +129,7 @@ public class ClientSearchRequestTest ext
count++;
}
- SearchResultDone done = cursor.getSearchDone();
+ SearchResultDone done = cursor.getSearchResultDone();
assertNotNull( done );
assertEquals( ResultCodeEnum.SUCCESS, done.getLdapResult().getResultCode() );
@@ -132,7 +140,7 @@ public class ClientSearchRequestTest ext
@Test
public void testSearchEquality() throws Exception
{
- Cursor<Response> cursor = connection.search( "ou=system", "(objectclass=organizationalUnit)",
+ SearchCursor cursor = connection.search( "ou=system", "(objectclass=organizationalUnit)",
SearchScope.ONELEVEL, "*", "+" );
int count = 0;
while ( cursor.next() )
Modified: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=1027982&r1=1027981&r2=1027982&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
(original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Wed Oct 27 14:42:33 2010
@@ -24,7 +24,7 @@ import java.io.IOException;
import java.util.List;
import org.apache.directory.shared.asn1.primitives.OID;
-import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -46,7 +46,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.message.ModifyDnResponse;
import org.apache.directory.shared.ldap.message.ModifyRequest;
import org.apache.directory.shared.ldap.message.ModifyResponse;
-import org.apache.directory.shared.ldap.message.Response;
import org.apache.directory.shared.ldap.message.SearchRequest;
import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.name.RDN;
@@ -204,10 +203,10 @@ public interface LdapConnection
* @param filter The filter to use for this search. It can't be empty
* @param scope The search scope : OBJECT, ONELEVEL or SUBTREE
* @param attributes The attributes to use for this search
- * @return A cursor on the result.
+ * @return A search cursor on the result.
* @throws LdapException if some error occurred
*/
- Cursor<Response> search( DN baseDn, String filter, SearchScope scope, String...
attributes )
+ SearchCursor search( DN baseDn, String filter, SearchScope scope, String... attributes
)
throws LdapException;
@@ -227,10 +226,10 @@ public interface LdapConnection
* @param filter The filter to use for this search. It can't be empty
* @param scope The search scope : OBJECT, ONELEVEL or SUBTREE
* @param attributes The attributes to use for this search
- * @return A cursor on the result.
+ * @return A search cursor on the result.
* @throws LdapException if some error occurred
*/
- Cursor<Response> search( String baseDn, String filter, SearchScope scope, String...
attributes )
+ SearchCursor search( String baseDn, String filter, SearchScope scope, String... attributes
)
throws LdapException;
@@ -238,10 +237,10 @@ public interface LdapConnection
* Performs search in a synchronous mode.
*
* @param searchRequest The search configuration
- * @return A {@link Cursor} containing Entries and References
+ * @return a search cursor on the result.
* @throws LdapException if some error occurred
*/
- Cursor<Response> search( SearchRequest searchRequest ) throws LdapException;
+ SearchCursor search( SearchRequest searchRequest ) throws LdapException;
//------------------------ The LDAP operations ------------------------//
Modified: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1027982&r1=1027981&r2=1027982&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Wed Oct 27 14:42:33 2010
@@ -65,6 +65,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
import org.apache.directory.shared.ldap.entry.DefaultEntry;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -1311,13 +1312,14 @@ public class LdapNetworkConnection exten
* @throws IOException if an IO exception occurred
* @see #bindGssApi(String, byte[], String, String, int, Control...)
*/
- public BindResponse bindGssApi( String name, String credentials, String realmName, String
kdcHost, int kdcPort, Control... ctrls )
- throws LdapException, IOException
+ public BindResponse bindGssApi( String name, String credentials, String realmName, String
kdcHost, int kdcPort,
+ Control... ctrls )
+ throws LdapException, IOException
{
return bindGssApi( name, StringTools.getBytesUtf8( credentials ), realmName, kdcHost,
kdcPort, ctrls );
}
-
-
+
+
/**
* Bind to the LDAP server using GSSAPI SASL mechanism.
*
@@ -1331,11 +1333,12 @@ public class LdapNetworkConnection exten
* @throws LdapException if an LDAP error occurred during bind
* @throws IOException if an IO exception occurred
*/
- public BindResponse bindGssApi( String name, byte[] credentials, String realmName, String
kdcHost, int kdcPort, Control... ctrls )
+ public BindResponse bindGssApi( String name, byte[] credentials, String realmName, String
kdcHost, int kdcPort,
+ Control... ctrls )
throws LdapException, IOException
{
BindRequest bindRequest = createBindRequest( name, credentials, SupportedSaslMechanisms.GSSAPI,
ctrls );
-
+
String krbConfPath = createKrbConfFile( realmName, kdcHost, kdcPort );
System.setProperty( "java.security.krb5.conf", krbConfPath );
@@ -1372,7 +1375,7 @@ public class LdapNetworkConnection exten
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( DN baseDn, String filter, SearchScope scope, String...
attributes )
+ public SearchCursor search( DN baseDn, String filter, SearchScope scope, String... attributes
)
throws LdapException
{
if ( baseDn == null )
@@ -1398,7 +1401,7 @@ public class LdapNetworkConnection exten
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( String baseDn, String filter, SearchScope scope,
String... attributes )
+ public SearchCursor search( String baseDn, String filter, SearchScope scope, String...
attributes )
throws LdapException
{
return search( new DN( baseDn ), filter, scope, attributes );
@@ -1486,7 +1489,7 @@ public class LdapNetworkConnection exten
/**
* {@inheritDoc}
*/
- public Cursor<Response> search( SearchRequest searchRequest ) throws LdapException
+ public SearchCursor search( SearchRequest searchRequest ) throws LdapException
{
if ( searchRequest == null )
{
@@ -1499,7 +1502,7 @@ public class LdapNetworkConnection exten
long timeout = getTimeout( searchRequest.getTimeLimit() );
- return new SearchCursor( searchFuture, timeout, TimeUnit.MILLISECONDS );
+ return new SearchCursorImpl( searchFuture, timeout, TimeUnit.MILLISECONDS );
}
@@ -1525,7 +1528,7 @@ public class LdapNetworkConnection exten
LOG.debug( "Sending Unbind request \n{}", unbindRequest );
// Send the request to the server
- // Use this for logging instead: WriteFuture unbindFuture = ldapSession.write( unbindRequest
);
+ // Use this for logging instead: WriteFuture unbindFuture = ldapSession.write( unbindRequest
);
ldapSession.write( unbindRequest );
//LOG.debug( "waiting for unbindFuture" );
@@ -3137,18 +3140,18 @@ public class LdapNetworkConnection exten
loadSchema( jarSchemaLoader );
}
- catch( LdapException e )
+ catch ( LdapException e )
{
throw e;
}
- catch( Exception e )
+ catch ( Exception e )
{
LOG.error( "failed to load the schema using JarLdifSchemaLoader", e );
throw new LdapException( e );
}
}
-
-
+
+
/**
* loads schema using the specified schema loader
*
@@ -3169,7 +3172,7 @@ public class LdapNetworkConnection exten
LOG.error( msg + " {}", schemaManager.getErrors() );
throw new LdapException( msg );
}
-
+
schemaManager = tmp;
}
catch ( LdapException le )
Copied: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
(from r1027850, directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?p2=directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java&p1=directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java&r1=1027850&r2=1027982&rev=1027982&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java
(original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
Wed Oct 27 14:42:33 2010
@@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.directory.ldap.client.api.future.SearchFuture;
import org.apache.directory.shared.ldap.cursor.AbstractCursor;
import org.apache.directory.shared.ldap.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.message.Response;
import org.apache.directory.shared.ldap.message.SearchResultDone;
@@ -38,9 +39,8 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class SearchCursor extends AbstractCursor<Response>
+public class SearchCursorImpl extends AbstractCursor<Response> implements SearchCursor
{
-
/** the search future */
private SearchFuture future;
@@ -67,7 +67,7 @@ public class SearchCursor extends Abstra
* @param timeout the timeout
* @param timeUnit the time unit
*/
- public SearchCursor( SearchFuture future, long timeout, TimeUnit timeUnit )
+ public SearchCursorImpl( SearchFuture future, long timeout, TimeUnit timeUnit )
{
this.future = future;
this.timeout = timeout;
@@ -147,11 +147,9 @@ public class SearchCursor extends Abstra
/**
- * gives the SearchResultDone message received at the end of search results
- *
- * @return the SearchResultDone message, null if the search operation fails for any reason
+ * {@inheritDoc}
*/
- public SearchResultDone getSearchDone()
+ public SearchResultDone getSearchResultDone()
{
return searchDoneResp;
}
Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/cursor/SearchCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/cursor/SearchCursor.java?rev=1027982&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/cursor/SearchCursor.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/cursor/SearchCursor.java
Wed Oct 27 14:42:33 2010
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.shared.ldap.cursor;
+
+
+import org.apache.directory.shared.ldap.message.Response;
+import org.apache.directory.shared.ldap.message.SearchResultDone;
+
+
+/**
+ * An extension of Cursor which includes the retrieval of the SearchResultDone.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface SearchCursor extends Cursor<Response>
+{
+ /**
+ * gives the SearchResultDone message received at the end of search results
+ *
+ * @return the SearchResultDone message, null if the search operation fails for any reason
+ */
+ public SearchResultDone getSearchResultDone();
+}
|