|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.logAnalyzer.analysis.LAAnalyzer
This class defines a template for log analyzers. A log analyzer analysis a
messageLabel and generate an LAAnalysis
.
Constructor Summary | |
LAAnalyzer(AnalyzerDefinition definition)
Constructs a new analyzer from an analyzer definition. |
|
LAAnalyzer(AnalyzerDefinition definition,
java.text.SimpleDateFormat dateFormat)
Constructs a new analyzer from an analyzer definition and a date format. |
Method Summary | |
void |
analyze(LAMessage message,
LALogHandler handler)
Analyzes the current message. |
protected abstract void |
analyzeMessage(LAMessage message)
Analyze the current messageLabel. |
abstract boolean |
canAnalyze(LALogHandler handler)
Returns true if the handler messages can be analyzed. |
LAAnalysis |
getAnalysis()
Returns the result of the analysis. |
java.text.SimpleDateFormat |
getDateFormat()
Returns the date format. |
java.lang.String |
getLabel()
Returns the label of the analyzer. |
java.lang.String |
getName()
Returns the name of the analyzer. |
java.text.NumberFormat |
getPercentFormat()
Returns the percent format. |
abstract void |
init(LALogHandler handler)
Make all initializations to prepare analysis. |
void |
initAnalyze(LALogHandler handler)
Make all initializations to prepare analysis. |
abstract void |
release(LALogHandler handler)
Make all releases after the analysis. |
void |
releaseAnalyze(LALogHandler handler)
Make all releases after the analysis. |
protected void |
setAnalysis(LAAnalysis analysis)
Sets the result of the analysis. |
protected void |
skipMessage(LAMessage message,
java.lang.Exception exception)
Skips the specified message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LAAnalyzer(AnalyzerDefinition definition)
definition
- Definition of the analyzer.public LAAnalyzer(AnalyzerDefinition definition, java.text.SimpleDateFormat dateFormat)
definition
- Definition of the analyzer.dateFormat
- Date format.Method Detail |
public final LAAnalysis getAnalysis()
protected final void setAnalysis(LAAnalysis analysis)
analysis
- Result of the analysis.public final java.text.SimpleDateFormat getDateFormat()
public final java.text.NumberFormat getPercentFormat()
public final java.lang.String getLabel()
public final java.lang.String getName()
public abstract boolean canAnalyze(LALogHandler handler) throws UnknownOrLiteralConverterException
handler
- Log handler using the analyzer.
UnknownOrLiteralConverterException
- If a column is missing.public final void initAnalyze(LALogHandler handler)
canAnalyze(LALogHandler)
and init(LALogHandler)
;
handler
- Log handler using the analyzer.public abstract void init(LALogHandler handler)
handler
- Log handler using the analyzer.public final void analyze(LAMessage message, LALogHandler handler)
analyzeMessage(LAMessage)
,
the analyzer specific implementation. If an exception is thrown, call
skipMessage(LAMessage, Exception)
.
message
- messageLabel to analysis.handler
- Log handler using the analyzer.protected abstract void analyzeMessage(LAMessage message) throws UnknownOrLiteralConverterException
message
- messageLabel to analyze.
UnknownOrLiteralConverterException
- If a converter or a literal can't be handled by the analyzer.protected void skipMessage(LAMessage message, java.lang.Exception exception)
analyze(LAMessage, LALogHandler)
when the previous call to
analyzeMessage(LAMessage)
has thrown an
UnknownOrLiteralConverterException
. This implementation do
nothing.
message
- messageLabel to skip.exception
- Exception thrown during analysis.public final void releaseAnalyze(LALogHandler handler)
release(LALogHandler)
.
handler
- Log handler using the analyzer.public abstract void release(LALogHandler handler)
handler
- Log handler using the analyzer.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |