source: SRUClient/trunk/src/main/java/eu/clarin/sru/client/SRUExplainHandler.java @ 2088

Last change on this file since 2088 was 2088, checked in by oschonef, 12 years ago
  • add JavaDocs? to public API
  • fix wrong constructor visibility with *Request classes
  • do a better job in hiding some non-public API
  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/**
2 * This software is copyright (c) 2011 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 */
17package eu.clarin.sru.client;
18
19import java.util.List;
20
21import javax.xml.stream.XMLStreamException;
22import javax.xml.stream.XMLStreamReader;
23
24
25/**
26 * Receive notifications to the response of a <em>explain</em> request.
27 *
28 * @see SRUExplainRequest
29 * @see <a href="http://www.loc.gov/standards/sru/specs/explain.html">SRU Explain Operation</a>
30 */
31public interface SRUExplainHandler {
32
33    /**
34     * Receive notification of diagnostics.
35     *
36     * @param diagnostics
37     *            a list of {@link SRUDiagnostic}
38     * @throws SRUClientException
39     *             any SRU exception, possibly wrapping another exception
40     * @see SRUDiagnostic
41     */
42    public void onDiagnostics(List<SRUDiagnostic> diagnostics)
43            throws SRUClientException;
44
45
46    /**
47     * Receive notification of request statistics.
48     *
49     * @param bytes
50     *            the size of the response in bytes
51     * @param millisTotal
52     *            the total time spend processing the request
53     * @param millisNetwork
54     *            the time spend performing network operations
55     * @param millisParsing
56     *            the time spend parsing the response
57     */
58    public void onRequestStatistics(int bytes, long millisTotal,
59            long millisNetwork, long millisParsing);
60
61
62    /**
63     * Receive notification of extra response data.
64     *
65     * @param reader
66     *            a {@link XMLStreamReader} to parse the extra response data
67     * @throws XMLStreamException
68     *             an error occurred while parsing the response
69     * @throws SRUClientException
70     *             any SRU exception, possibly wrapping another exception
71     * @see <a href="http://www.loc.gov/standards/sru/specs/extra-data.html">SRU
72     *      Extra Data / Extensions</a>
73     */
74    public void onExtraResponseData(XMLStreamReader reader)
75            throws XMLStreamException, SRUClientException;
76
77} // interface SRUExplainHandler
Note: See TracBrowser for help on using the repository browser.