Interface LogReadHandler

  • All Known Implementing Classes:
    LogReadFileHandler

    public interface LogReadHandler
    LogReadHandler interface provides methods that must be present in each log read handler to read a log file. The LogReader knows only these methods and will call one of these as required.
    • Method Detail

      • logRecRead

        String[][] logRecRead​(String fileName,
                              LogQuery qry,
                              boolean sourceData)
                       throws IOException,
                              NoSuchFieldException,
                              IllegalArgumentException,
                              RuntimeException,
                              Exception
        LogReader calls this method method. It collects header, records, applies query (if any), sorts (if asked) the records on field, checks the max records to return, collects all the recods and returns.
        Parameters:
        fileName - is complete filename with path
        qry - is user specified qury chriteria with sorting requirement
        sourceData - it specifies whether return data should be original data received by logger (source) or formatted data as in file.
        Returns:
        all the matched records with query
        Throws:
        IOException - if it fails to read log records.
        NoSuchFieldException - if it fails to retrieve the name of field.
        IllegalArgumentException - if query has wrong value.
        RuntimeException - if it fails to retrieve log record.
        Exception - if it fails any of operation.
      • logRecRead

        String[][] logRecRead​(Set fileNames,
                              LogQuery qry,
                              boolean sourceData)
                       throws IOException,
                              NoSuchFieldException,
                              IllegalArgumentException,
                              RuntimeException,
                              Exception
        LogReader calls this method method. It collects header, records, applies query (if any), sorts (if asked) the records on field, checks the max records to return, collects all the recods and returns.
        Parameters:
        fileNames - is a Set of filenames complete with path
        qry - is user specified qury chriteria with sorting requirement
        sourceData - it specifies whether return data should be original data received by logger (source) or formatted data as in file.
        Returns:
        all the matched records with query
        Throws:
        IOException - if it fails to read log records.
        NoSuchFieldException - if it fails to retrieve the name of field.
        IllegalArgumentException - if query has wrong value.
        RuntimeException - if it fails to retrieve log record.
        Exception - if it fails any of operation.