KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnet > Search > SearchInterface


1 /*
2  * SearchInterface.java
3  *
4  * Created on 28. duben 2004, 15:55
5  */

6
7 package SOFA.SOFAnet.Search;
8
9 /**
10  * Client interface of search subsytem
11  *
12  * @author Ladislav Sobr
13  */

14 public interface SearchInterface
15 {
16   /**
17    * Performs search request in the search network.
18    * <p>
19    * Input:
20    * <ul>
21    * <li> searchPattern &nbsp;&nbsp;<i> request itself - what are we looking for</i>
22    * <li> firstOnly &nbsp;&nbsp;<i> wheter take only one (first) satisfying reply or all replies came in time limit</i>
23    * <li> shareGroups &nbsp;&nbsp;<i> name of share groups that we should search through (null means "all")</i>
24    * <li> timeout &nbsp;&nbsp;<i> maximal time in milliseconds to wait for the reply(ies)</i>
25    * </ul>
26    * <p>
27    * Output:
28    * <ul>
29    * <li> errCode
30    * <ul>
31    * <li> 0 == OK
32    * <li> 1 == error occured
33    * </ul>
34    * <li> replies &nbsp;&nbsp;<i> list of replies to the request (only if errCode == 0)</i>
35    * </ul>
36    *
37    * @param request Input/Output data for the call
38    */

39   void request(SearchRequest request) throws SearchException;
40
41   /**
42    * Replies to search request.
43    * <p>
44    * Input:
45    * <ul>
46    * <li> requestID &nbsp;&nbsp;<i> identification of request that this reply belongs to (includes requesting node name)</i>
47    * <li> replies &nbsp;&nbsp;<i> list of replies</i>
48    * </ul>
49    * <p>
50    * Output: none
51    *
52    * @param reply Input data for the call
53    */

54   void reply(SearchReply reply) throws SearchException;
55 }
56
Popular Tags