com.sun.slamd.dslogplay
Class LogParser

java.lang.Object
  extended bycom.sun.slamd.dslogplay.LogParser

public class LogParser
extends java.lang.Object

This class defines a utility that may be used to parse Directory Server access log files and convert them into operations that may be replayed against the server.


Constructor Summary
LogParser(LogPlaybackJobClass jobThread, boolean captureAdds, boolean captureBinds, boolean captureCompares, boolean captureDeletes, boolean captureModifies, boolean captureSearches)
          Creates a new log parser that will be used to capture the specified types of elements.
 
Method Summary
 LogOperation[] getOperations()
          Retrieves an array containing the operations that have been captured from the log file(s).
 void parseLogFile(java.lang.String logFile)
          Parses the specified log file and captures information about the appropriate operations contained in it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogParser

public LogParser(LogPlaybackJobClass jobThread,
                 boolean captureAdds,
                 boolean captureBinds,
                 boolean captureCompares,
                 boolean captureDeletes,
                 boolean captureModifies,
                 boolean captureSearches)
Creates a new log parser that will be used to capture the specified types of elements.

Parameters:
jobThread - The job thread with which this parser is associated.
captureAdds - Indicates whether to capture add operations.
captureBinds - Indicates whether to capture bind operations.
captureCompares - Indicates whether to capture compare operations.
captureDeletes - Indicates whether to capture delete operations.
captureModifies - Indicates whether to capture modify operations.
captureSearches - Indicates whether to capture search operations.
Method Detail

parseLogFile

public void parseLogFile(java.lang.String logFile)
                  throws java.io.IOException
Parses the specified log file and captures information about the appropriate operations contained in it.

Parameters:
logFile - The path to the log file to be parsed.
Throws:
java.io.IOException - If a problem occurs while reading the log file.

getOperations

public LogOperation[] getOperations()
Retrieves an array containing the operations that have been captured from the log file(s).

Returns:
An array containing the operations that have been captured from the log file(s).