|
TPTP 4.4.0 Monitoring Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.logging.parsers.Parser
org.eclipse.hyades.logging.parsers.MonitoringParser
org.eclipse.hyades.logging.parsers.AbstractAccessLogParser
AbstractAccessLogParser is the abstract super class for the ApacheAccessLogParser.
For each access log record, this class parses the client IP address, user ID, time
stamp, method, file name, return code and file size. This parsed information and
information about the local machine (machine where the parse is performed, but not
necessarily the machine that produced the access log) is used to produce a
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent object for each record.
This parser is based on the Apache Common Log Format (CLF) or "%h %l %u %t \"%r\" %>s %b".
For more information, see the
Apache HTTP Server Version 2.0 specification (Access Log File).
Parser,
CommonBaseEvent| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
cgiDebuggingOutput
CGI debugging output. |
protected java.lang.String |
clientIP
Parsed value of the client's IP address field. |
protected java.lang.StringBuffer |
currentTimeStamp
Parsed value of the time stamp field converted to the XML dateTime format. |
protected java.lang.String |
fileName
Parsed value of the file name field. |
protected java.lang.String |
fileSize
Parsed value of the file size field. |
protected java.lang.String |
message
Parsed value of the message portion of the access log record. |
protected java.lang.String |
method
Parsed value of the method field. |
protected java.lang.String |
productVersion
User-supplied value of the version of the web server product. |
protected java.lang.String |
referer
Parsed value of the Referer field. |
protected java.lang.String |
returnCode
Parsed value of the return code field. |
protected FilterExitHelper |
sensorFilterExitHelper
The filter exit helper object is used to retrieve filter exit data |
protected java.lang.String |
sourceID
Web server product name and version supplied by the subclass. |
protected java.lang.String |
userAgent
Parsed value of the User-agent field. |
protected java.lang.String |
userID
Parsed value of the userid field. |
| Fields inherited from class org.eclipse.hyades.logging.parsers.Parser |
|---|
arrayIndex, bytesRead, charset, curLine, curLineNumber, defaultArraySize, enableICU, EOL_CHARS, EOL_LAST_CHAR, eventFactory, file_path, fileLocale, fileULocale, filter, filterExitClass, filterExitClassInstance, flushingMode, lastOffset, localHostId, localHostIdFormat, localHostName, logBuffer, logBufferInitialSize, logFile, logger, MessageArraySize, messages, mfr, originLocale, prefix, processedSize, recordCount, seqNums, tmpFile, totalSize, UNKNOWN_HOST |
| Constructor Summary | |
|---|---|
AbstractAccessLogParser()
|
|
| Method Summary | |
|---|---|
protected void |
determineSeverity(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent message)
Uses the return code of the message to determine the severity. |
protected boolean |
parseDate(int startIndex,
int endIndex)
Parses a time stamp from an access log record, produces a Date object from the parsed information, and converts the Date object into a XML DateTime String. |
protected boolean |
parseLogRecord()
Main parsing routine for an access log record. |
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] |
parseNext()
Parses each access log record and produces a Common Base Event (CBE) object that is returned as a member of a CBE array. |
void |
postParse()
De-constructs this parser (e.g. closes the log file handle). |
void |
preParse()
Initialize this parser. |
protected void |
reset()
Resets the parsed values of a log record before next record is parsed. |
void |
setConfiguration(java.util.Hashtable table)
This function is called to provide user-specified information to the parser. |
| Methods inherited from class org.eclipse.hyades.logging.parsers.MonitoringParser |
|---|
getFilePointer, isEndOfFile, readALine, readLine, setConverterCommand, setConverterCommand, setEndOfFile, setFilename |
| Methods inherited from class org.eclipse.hyades.logging.parsers.Parser |
|---|
createStringEDE, getFilterExitClassInstance, getLocale, getLocalHostId, getMessages, getName, getParserLogger, getProcessedSize, getTotalSize, getVersion, increaseMsgArraySize, isChar, isFlushingMode, isLet, isLet, isNum, isNum, parse, setFlushingMode, setParserLogger, setUserInput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String clientIP
protected java.lang.String method
protected java.lang.String fileName
protected java.lang.String returnCode
protected java.lang.String fileSize
protected java.lang.String userID
protected java.lang.String userAgent
protected java.lang.String referer
protected java.lang.String message
protected java.lang.StringBuffer currentTimeStamp
protected java.lang.StringBuffer cgiDebuggingOutput
protected java.lang.String productVersion
protected java.lang.String sourceID
protected FilterExitHelper sensorFilterExitHelper
| Constructor Detail |
public AbstractAccessLogParser()
| Method Detail |
public void setConfiguration(java.util.Hashtable table)
throws LogParserException
MonitoringParser
setConfiguration in interface IParsersetConfiguration in class MonitoringParsertable - Hashtable containing keys and values of user-specified information
LogParserException - if user-specified path and name for the log file does not exist on the parsing machine
public void preParse()
throws LogParserException
preParse in interface IParserpreParse in class ParserLogParserException - if the parser cannot be initialized.
public void postParse()
throws LogParserException
postParse in interface IParserpostParse in class MonitoringParserLogParserException - if the parser cleanup fails
public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] parseNext()
throws LogParserException
parseNext in interface IParserparseNext in class ParserLogParserException - if the parser is unable to parse the access logprotected void determineSeverity(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent message)
message - - the CommmonBaseEvent to set the severity in
protected boolean parseDate(int startIndex,
int endIndex)
startIndex - Starting index of time stamp in curLine.endIndex - Ending index of time stamp in curLine.
protected boolean parseLogRecord()
protected void reset()
|
TPTP 4.4.0 Monitoring Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||