network.detectors
Class SyntheticEventDetector

java.lang.Object
  extended bynetwork.detectors.EventDetector
      extended bynetwork.detectors.SyntheticEventDetector
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class SyntheticEventDetector
extends EventDetector

See Also:
Serialized Form

Field Summary
protected  com.oroinc.text.regex.PatternCompiler compiler
           
protected  int currentYear
           
protected  java.lang.String[][] eventInfoTable
           
protected  java.lang.String eventName
           
protected  com.oroinc.text.regex.PatternMatcher matcher
           
protected  java.util.Vector monthLookup
           
protected  java.lang.String paramInstr
           
protected  java.util.Vector paramProcInstr
           
protected  java.lang.String pattern
           
protected  boolean toolsCreated
           
 
Fields inherited from class network.detectors.EventDetector
agentURN, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable
 
Constructor Summary
SyntheticEventDetector(ConfigObject configObj)
           
SyntheticEventDetector(java.lang.String input, ConfigObject configObj)
           
SyntheticEventDetector(java.util.Vector localtriggeringEventClassNames, java.util.Vector remotetriggeringEventClassNames, ConfigObject configObj)
           
 
Method Summary
 java.util.Vector generateEvent(Event triggeredEvent)
           
 java.lang.String getGeneratingEventClassName()
           
 java.lang.String getGeneratingEventClassName2()
           
protected  java.util.Vector match(java.lang.String line, java.lang.String inputPattern)
           
static java.util.Vector parsePatternFile(java.lang.String fileName)
          Parses the patternfile and returns a vector of patternInfo read from the file.
 void populatePatterns(java.util.Vector patternVector)
           
 void setLastReadTime(long lastReadTime)
          Method to set the time when the syslog file was read last
 
Methods inherited from class network.detectors.EventDetector
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, modifyDetector, printRunningThreads, run, setAgentURN, setAlarmLevel, setAlertLevel, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, stopDetector, switchOffPrintRunningThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventInfoTable

protected java.lang.String[][] eventInfoTable

pattern

protected java.lang.String pattern

eventName

protected java.lang.String eventName

paramProcInstr

protected java.util.Vector paramProcInstr

currentYear

protected int currentYear

paramInstr

protected java.lang.String paramInstr

toolsCreated

protected boolean toolsCreated

matcher

protected com.oroinc.text.regex.PatternMatcher matcher

compiler

protected com.oroinc.text.regex.PatternCompiler compiler

monthLookup

protected java.util.Vector monthLookup
Constructor Detail

SyntheticEventDetector

public SyntheticEventDetector(ConfigObject configObj)
                       throws java.lang.Exception

SyntheticEventDetector

public SyntheticEventDetector(java.util.Vector localtriggeringEventClassNames,
                              java.util.Vector remotetriggeringEventClassNames,
                              ConfigObject configObj)
                       throws java.lang.Exception

SyntheticEventDetector

public SyntheticEventDetector(java.lang.String input,
                              ConfigObject configObj)
Method Detail

getGeneratingEventClassName

public java.lang.String getGeneratingEventClassName()
Specified by:
getGeneratingEventClassName in class EventDetector
Returns:

getGeneratingEventClassName2

public java.lang.String getGeneratingEventClassName2()

generateEvent

public java.util.Vector generateEvent(Event triggeredEvent)
Specified by:
generateEvent in class EventDetector
Parameters:
triggeredEvent -
Returns:

match

protected java.util.Vector match(java.lang.String line,
                                 java.lang.String inputPattern)
Parameters:
line -
inputPattern -
Returns:

parsePatternFile

public static java.util.Vector parsePatternFile(java.lang.String fileName)
                                         throws java.lang.Exception
Parses the patternfile and returns a vector of patternInfo read from the file. PatternInfo object contains the Event Class, name of the event, the pattern and the processing instruction(The substring numbers which are useful for processing the parsed logfile)

Parameters:
fileName - Name of the file containing the patterns
Returns:
Throws:
java.lang.Exception

populatePatterns

public void populatePatterns(java.util.Vector patternVector)
Overrides:
populatePatterns in class EventDetector
Parameters:
patternVector -
Returns:

setLastReadTime

public void setLastReadTime(long lastReadTime)
Method to set the time when the syslog file was read last

Parameters:
lastReadTime - The time when syslog file was last read in ms
Returns: