Package eu.clarin.sru.client
Interface SRUScanHandler
-
- All Known Subinterfaces:
SRUDefaultHandler
- All Known Implementing Classes:
SRUDefaultHandlerAdapter
public interface SRUScanHandler
Receive notifications to the response of a scan request.- See Also:
SRUScanRequest
, SRU Scan Operation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDiagnostics(List<SRUDiagnostic> diagnostics)
Receive notification of diagnostics.void
onExtraResponseData(XMLStreamReader reader)
Receive notification of extra response data.void
onExtraTermData(String value, XMLStreamReader reader)
Receive notification of extra term data.void
onFinishTerms()
Receive notifications of the end of the enumeration of terms in the response.void
onRequestStatistics(int totalBytesTransferred, long millisTotal, long millisNetwork, long millisProcessing)
Receive notification of request statistics.void
onStartTerms()
Receive notifications of the start of the enumeration of terms in the response.void
onTerm(String value, int numberOfRecords, String displayTerm, SRUWhereInList whereInList)
Receive notification of a term.
-
-
-
Method Detail
-
onDiagnostics
void onDiagnostics(List<SRUDiagnostic> diagnostics) throws SRUClientException
Receive notification of diagnostics.- Parameters:
diagnostics
- a list ofSRUDiagnostic
- Throws:
SRUClientException
- any SRU exception, possibly wrapping another exception- See Also:
SRUDiagnostic
-
onRequestStatistics
void onRequestStatistics(int totalBytesTransferred, long millisTotal, long millisNetwork, long millisProcessing)
Receive notification of request statistics.- Parameters:
totalBytesTransferred
- the total number of bytes transferred while receiving the responsemillisTotal
- the total time spend processing the requestmillisNetwork
- the time spend performing network operationsmillisProcessing
- the time spend processing the response
-
onExtraResponseData
void onExtraResponseData(XMLStreamReader reader) throws XMLStreamException, SRUClientException
Receive notification of extra response data.- Parameters:
reader
- aXMLStreamReader
to parse the extra response data- Throws:
XMLStreamException
- an error occurred while parsing the responseSRUClientException
- any SRU exception, possibly wrapping another exception- See Also:
- SRU Extra Data / Extensions
-
onStartTerms
void onStartTerms() throws SRUClientException
Receive notifications of the start of the enumeration of terms in the response.- Throws:
SRUClientException
- any SRU exception, possibly wrapping another exception
-
onFinishTerms
void onFinishTerms() throws SRUClientException
Receive notifications of the end of the enumeration of terms in the response.- Throws:
SRUClientException
- any SRU exception, possibly wrapping another exception
-
onTerm
void onTerm(String value, int numberOfRecords, String displayTerm, SRUWhereInList whereInList) throws SRUClientException
Receive notification of a term.- Parameters:
value
- the term (exactly) as it appears in the indexnumberOfRecords
- the number of records for the current term which would be matcheddisplayTerm
- a string for the current term to display to the end user in place of the term itself ornull
if not availablewhereInList
- a flag to indicate the position of the term within the complete term list ornull
of not available- Throws:
SRUClientException
- any SRU exception, possibly wrapping another exception
-
onExtraTermData
void onExtraTermData(String value, XMLStreamReader reader) throws XMLStreamException, SRUClientException
Receive notification of extra term data.- Parameters:
value
- the term (exactly) as it appears in the indexreader
- aXMLStreamReader
to parse the extra term data- Throws:
XMLStreamException
- an error occurred while parsing the responseSRUClientException
- any SRU exception, possibly wrapping another exception
-
-