001    /*
002     * CDDL HEADER START
003     *
004     * The contents of this file are subject to the terms of the
005     * Common Development and Distribution License, Version 1.0 only
006     * (the "License").  You may not use this file except in compliance
007     * with the License.
008     *
009     * You can obtain a copy of the license at
010     * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011     * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012     * See the License for the specific language governing permissions
013     * and limitations under the License.
014     *
015     * When distributing Covered Code, include this CDDL HEADER in each
016     * file and include the License file at
017     * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
018     * add the following below this CDDL HEADER, with the fields enclosed
019     * by brackets "[]" replaced with your own identifying information:
020     *      Portions Copyright [yyyy] [name of copyright owner]
021     *
022     * CDDL HEADER END
023     *
024     *
025     *      Copyright 2006-2008 Sun Microsystems, Inc.
026     */
027    package org.opends.server.protocols.internal;
028    
029    
030    
031    import org.opends.server.types.DirectoryException;
032    import org.opends.server.types.SearchResultEntry;
033    import org.opends.server.types.SearchResultReference;
034    
035    
036    
037    /**
038     * This interface defines the methods that must be implemented by a
039     * class that wishes to perform an internal search operation and be
040     * notified of matching entries and referrals as they arrive rather
041     * than altogether when the search has completed.
042     */
043    @org.opends.server.types.PublicAPI(
044         stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
045         mayInstantiate=false,
046         mayExtend=true,
047         mayInvoke=false)
048    public interface InternalSearchListener
049    {
050      /**
051       * Performs any processing necessary for the provided search result
052       * entry.
053       *
054       * @param  searchOperation  The internal search operation being
055       *                          processed.
056       * @param  searchEntry      The matching search result entry to be
057       *                          processed.
058       *
059       * @throws  DirectoryException  If a problem occurred while handling
060       *                              the provided entry.  Search
061       *                              processing will be terminated, and
062       *                              the search operation will result
063       *                              will be set based on this exception.
064       */
065      public void handleInternalSearchEntry(
066                       InternalSearchOperation searchOperation,
067                       SearchResultEntry searchEntry)
068             throws DirectoryException;
069    
070    
071    
072      /**
073       * Performs any processing necessary for the provided search result
074       * reference.
075       *
076       * @param  searchOperation  The internal search operation being
077       *                          processed.
078       * @param  searchReference  The search result reference to be
079       *                          processed.
080       *
081       * @throws  DirectoryException  If a problem occurred while handling
082       *                              the provided entry.  Search
083       *                              processing will be terminated, and
084       *                              the search operation will result
085       *                              will be set based on this exception.
086       */
087      public void handleInternalSearchReference(
088                       InternalSearchOperation searchOperation,
089                       SearchResultReference searchReference)
090             throws DirectoryException;
091    }
092