net.logAnalyzer.analysis
Class AnalyzerDefinition

java.lang.Object
  extended bynet.logAnalyzer.analysis.AnalyzerDefinition

public final class AnalyzerDefinition
extends java.lang.Object

This class contains the definition of an analyzer.

An analyzer is used to analyze each log messageLabel loaded from a log file during the LALogHandler parsing process (see LALogHandler.parse()).

There is two kinds of analyzers :

To create a new analyzer from its definition, call createAnalyzerInstance().

Version:
0.1
Author:
Karim REFEYTON

Constructor Summary
AnalyzerDefinition(java.lang.String name, java.lang.String period, java.lang.String classname, java.lang.String label)
          Construct a new analyzer definition.
 
Method Summary
 LAAnalyzer createAnalyzerInstance()
          Create a new instance of the analyzer.
 java.lang.Class getAnalyzerClass()
          Return the analyzer class.
 java.lang.String getLabel()
          Return the user friendly label of the analyzer.
 java.lang.String getName()
          Return the analyzer name.
 LATimePeriod getPeriod()
          Return the analyzer period.
 boolean hasPeriod()
          Return true if the analyzer has a period.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalyzerDefinition

public AnalyzerDefinition(java.lang.String name,
                          java.lang.String period,
                          java.lang.String classname,
                          java.lang.String label)
                   throws java.lang.ClassNotFoundException
Construct a new analyzer definition.

Parameters:
name - Name of the analyzer.
period - Time period for time analyzer.
classname - Class of the new analyzer instances.
label - User friendly label.
Throws:
java.lang.ClassNotFoundException - If the specified analyzer class does not exists.
Method Detail

getAnalyzerClass

public java.lang.Class getAnalyzerClass()
Return the analyzer class.

Returns:
Analyzer class.

getName

public java.lang.String getName()
Return the analyzer name.

Returns:
Analyzer name.

getPeriod

public LATimePeriod getPeriod()
Return the analyzer period.

Returns:
Period.

hasPeriod

public boolean hasPeriod()
Return true if the analyzer has a period.

Returns:
true if has a period; false otherwise.

getLabel

public java.lang.String getLabel()
Return the user friendly label of the analyzer.

Returns:
User friendly label.

createAnalyzerInstance

public LAAnalyzer createAnalyzerInstance()
                                  throws PatternParsingException
Create a new instance of the analyzer.

Returns:
New instance.
Throws:
PatternParsingException - If an error occures during pattern parsing.


Copyright © 2006 null. All Rights Reserved.