KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > search > ISearchEngineResultCollector


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.help.search;
12
13 import org.eclipse.core.runtime.IStatus;
14
15 /**
16  * A collector for the search hits (asynchronously) returned by the help search
17  * participants.
18  * <p>
19  * This interface is intended to be implemented by clients and passed to the
20  * search engine instance.
21  *
22  * @since 3.1
23  */

24 public interface ISearchEngineResultCollector {
25     /**
26      * Accepts a new search result object.
27      *
28      * @param searchResult
29      * the new search result
30      */

31     void accept(ISearchEngineResult searchResult);
32
33     /**
34      * Accepts an array of new search results.
35      *
36      * @param searchResults
37      * an array of search result objects
38      */

39     void accept(ISearchEngineResult[] searchResults);
40
41     /**
42      * Notifies the collector that an error has occured in the search engine.
43      * The kinds of errors that are reported this way are not abnormal problems
44      * or internal errors. Unexpected problems should be left to the job manager
45      * to handle by throwing a <code>CoreException</code>. Use this method to
46      * report errors that are expected to occur from time to time (e.g., server
47      * down, server timeout, incorrect URL etc.).
48      *
49      * @param status
50      * the reported error status
51      */

52     void error(IStatus status);
53 }
54
Popular Tags