Last change
on this file since 2183 was
2183,
checked in by oschonef, 12 years ago
|
- add callback mechanism to SRUThreadedClient
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | /** |
---|
2 | * This software is copyright (c) 2011-2012 by |
---|
3 | * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) |
---|
4 | * This is free software. You can redistribute it |
---|
5 | * and/or modify it under the terms described in |
---|
6 | * the GNU General Public License v3 of which you |
---|
7 | * should have received a copy. Otherwise you can download |
---|
8 | * it from |
---|
9 | * |
---|
10 | * http://www.gnu.org/licenses/gpl-3.0.txt |
---|
11 | * |
---|
12 | * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) |
---|
13 | * |
---|
14 | * @license http://www.gnu.org/licenses/gpl-3.0.txt |
---|
15 | * GNU General Public License v3 |
---|
16 | */ |
---|
17 | package eu.clarin.sru.client; |
---|
18 | |
---|
19 | /** |
---|
20 | * A interface for creating asynchronous callbacks for use with the |
---|
21 | * {@link SRUThreadedClient}. |
---|
22 | * |
---|
23 | * <p> |
---|
24 | * NB: the callbacks will be executed by any of worker threads of the client. |
---|
25 | * </p> |
---|
26 | * |
---|
27 | * @param <T> |
---|
28 | * a response type |
---|
29 | * |
---|
30 | * @see SRUThreadedClient#explain(SRUExplainRequest, SRUCallback) |
---|
31 | * @see SRUThreadedClient#scan(SRUScanRequest, SRUCallback) |
---|
32 | * @see SRUThreadedClient#searchRetrieve(SRUSearchRetrieveRequest, SRUCallback) |
---|
33 | */ |
---|
34 | public interface SRUCallback<T extends SRUAbstractResponse<?>> { |
---|
35 | |
---|
36 | /** |
---|
37 | * Invoked when the request has been completed successfully. |
---|
38 | * |
---|
39 | * @param response |
---|
40 | * the response to the rquest |
---|
41 | */ |
---|
42 | public void done(T response); |
---|
43 | |
---|
44 | } // interface SRUCallback |
---|
Note: See
TracBrowser
for help on using the repository browser.