Package eu.clarin.sru.client
Interface SRUScanHandler
-
- All Known Subinterfaces:
SRUDefaultHandler
- All Known Implementing Classes:
SRUDefaultHandlerAdapter
public interface SRUScanHandlerReceive 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 voidonDiagnostics(List<SRUDiagnostic> diagnostics)Receive notification of diagnostics.voidonExtraResponseData(XMLStreamReader reader)Receive notification of extra response data.voidonExtraTermData(String value, XMLStreamReader reader)Receive notification of extra term data.voidonFinishTerms()Receive notifications of the end of the enumeration of terms in the response.voidonRequestStatistics(int totalBytesTransferred, long millisTotal, long millisNetwork, long millisProcessing)Receive notification of request statistics.voidonStartTerms()Receive notifications of the start of the enumeration of terms in the response.voidonTerm(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- aXMLStreamReaderto 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 SRUClientExceptionReceive 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 SRUClientExceptionReceive 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 ornullif not availablewhereInList- a flag to indicate the position of the term within the complete term list ornullof 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- aXMLStreamReaderto parse the extra term data- Throws:
XMLStreamException- an error occurred while parsing the responseSRUClientException- any SRU exception, possibly wrapping another exception
-
-