mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
28.47.2010 f2160f4bd1c8ac67e5a86a6710d431e8932877f9
sdk/src/org/opends/sdk/SearchResultHandler.java
@@ -35,30 +35,33 @@
/**
 * A completion handler for consuming the results of an asynchronous
 * Search operation.
 * A completion handler for consuming the results of a Search operation.
 * <p>
 * {@link Connection} objects allow a search result completion handler
 * to be specified when sending Search operation requests to a Directory
 * Server. The {@link #handleEntry} method is invoked each time a Search
 * Result Entry is returned from the Directory Server. The
 * {@link #handleReference} method is invoked for each Search Result
 * Reference returned from the Directory Server.
 * {@link Connection} and {@link AsynchronousConnection} objects allow a search
 * result completion handler to be specified when sending Search operation
 * requests to a Directory Server. The {@link #handleEntry} method is invoked
 * each time a Search Result Entry is returned from the Directory Server. The
 * {@link #handleReference} method is invoked for each Search Result Reference
 * returned from the Directory Server.
 * <p>
 * Implementations of these methods should complete in a timely manner
 * so as to avoid keeping the invoking thread from dispatching to other
 * completion handlers.
 * Implementations of these methods should complete in a timely manner so as to
 * avoid keeping the invoking thread from dispatching to other completion
 * handlers.
 */
public interface SearchResultHandler
{
  /**
   * Invoked each time a search result entry is returned from an
   * asynchronous search operation.
   * Invoked each time a search result entry is returned from an asynchronous
   * search operation.
   *
   * @param entry
   *          The search result entry.
   * @return {@code true} if this handler should continue to be notified of any
   *         remaining entries and references, or {@code false} if the remaining
   *         entries and references should be skipped for some reason (e.g. a
   *         client side size limit has been reached).
   */
  void handleEntry(SearchResultEntry entry);
  boolean handleEntry(SearchResultEntry entry);
@@ -68,6 +71,10 @@
   *
   * @param reference
   *          The search result reference.
   * @return {@code true} if this handler should continue to be notified of any
   *         remaining entries and references, or {@code false} if the remaining
   *         entries and references should be skipped for some reason (e.g. a
   *         client side size limit has been reached).
   */
  void handleReference(SearchResultReference reference);
  boolean handleReference(SearchResultReference reference);
}