Interface SRUSearchRetrieveHandler

    • Method Detail

      • 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 response
        millisTotal - the total time spend processing the request
        millisNetwork - the time spend performing network operations
        millisProcessing - the time spend processing the response
      • onStartRecords

        void onStartRecords​(int numberOfRecords,
                            String resultSetId,
                            int resultSetIdleTime)
                     throws SRUClientException
        Receive notifications of the start of the enumeration of records in the response.
        Parameters:
        numberOfRecords - the number of records or -1 if not available
        resultSetId - the result set id or null if not available
        resultSetIdleTime - the result set idle time or -1 if not available
        Throws:
        SRUClientException - any SRU exception, possibly wrapping another exception
      • onFinishRecords

        void onFinishRecords​(int nextRecordPosition)
                      throws SRUClientException
        Receive notifications of the end of the enumeration of records in the response.
        Parameters:
        nextRecordPosition - the next record position or -1 if not available
        Throws:
        SRUClientException - any SRU exception, possibly wrapping another exception
      • onRecord

        void onRecord​(String identifier,
                      int position,
                      SRURecordData data)
               throws SRUClientException
        Receive notification of a record in the result set.
        Parameters:
        identifier - identifier of the record or null if not available
        position - position of the record in the result set or -1 if not available
        data - the parsed record data
        Throws:
        SRUClientException - any SRU exception, possibly wrapping another exception
        See Also:
        SRURecordData, SRURecordDataParser
      • onSurrogateRecord

        void onSurrogateRecord​(String identifier,
                               int position,
                               SRUDiagnostic data)
                        throws SRUClientException
        Receive notification of a surrogate record in the result set.
        Parameters:
        identifier - identifier of the record or null if not available
        position - position of the record in the result set or -1 if not available
        data - the surrogate record data, i.e. a diagnostic
        Throws:
        SRUClientException - any SRU exception, possibly wrapping another exception
        See Also:
        SRUDiagnostic
      • onExtraRecordData

        void onExtraRecordData​(String identifier,
                               int position,
                               XMLStreamReader reader)
                        throws XMLStreamException,
                               SRUClientException
        Receive notification of extra record data.
        Parameters:
        identifier - identifier of the record or null if not available
        position - position of the record in the result set or -1 if not available
        reader - a XMLStreamReader to parse the extra term data
        Throws:
        XMLStreamException - an error occurred while parsing the response
        SRUClientException - any SRU exception, possibly wrapping another exception