network.detectors
Class AgentServerLogEventDetector

java.lang.Object
  |
  +--network.detectors.EventDetector
        |
        +--network.detectors.AgentServerLogEventDetector
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class AgentServerLogEventDetector
extends EventDetector

See Also:
Serialized Form

Field Summary
protected  com.oroinc.text.regex.PatternCompiler compiler
          Perl pattern match compiler
protected  int currentYear
           
private  java.lang.String[] defaultLocalTriggeringEvents
          The events which trigger AgentServerLogEvent
(package private)  java.io.RandomAccessFile dis
          A random access file object to read the logfile
protected  java.lang.String[][] eventInfoTable
           
(package private)  int EVENTLIMIT
          Max number of events to be read for a single TimerEvent
protected  java.lang.String eventName
           
(package private)  java.io.File file
          File handle for the logfile
(package private)  long filePtr
          Last position read in the file
(package private)  java.lang.String logFilename
          Name of the agentServer Log file
protected  com.oroinc.text.regex.PatternMatcher matcher
          Perl pattern matcher object
protected  java.util.Vector monthLookup
           
(package private)  long newLen
           
protected  java.lang.String paramInstr
           
protected  java.util.Vector paramProcInstr
           
protected  java.lang.String pattern
           
private  java.util.Vector patternVector
           
(package private)  long prevLen
           
protected  boolean toolsCreated
           
 
Fields inherited from class network.detectors.EventDetector
agentURN, attempts, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, printRunningThreadsFlag, remoteTriggeringEvents, reportTable
 
Constructor Summary
AgentServerLogEventDetector(ConfigObject configObj)
          Default constructor for the AgentServerLogEventDetector.
AgentServerLogEventDetector(java.lang.String logFileName, ConfigObject configObj)
          Constructor for the AgentServerLogDetector.
 
Method Summary
private  void addMonths()
           
 java.util.Vector generateEvent(network.events.Event triggerringEvent)
          Generates an
 java.lang.String getGeneratingEventClassName()
          Function which returns the generated Event Class name
protected  java.util.Vector match(java.lang.String line, java.lang.String inputPattern)
           
 void populatePatterns(java.util.Vector patternVector)
           
private  java.util.Vector readLogFile()
           
 
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

dis

java.io.RandomAccessFile dis
A random access file object to read the logfile


logFilename

java.lang.String logFilename
Name of the agentServer Log file


filePtr

long filePtr
Last position read in the file


EVENTLIMIT

int EVENTLIMIT
Max number of events to be read for a single TimerEvent


defaultLocalTriggeringEvents

private java.lang.String[] defaultLocalTriggeringEvents
The events which trigger AgentServerLogEvent


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

patternVector

private java.util.Vector patternVector

monthLookup

protected java.util.Vector monthLookup

matcher

protected com.oroinc.text.regex.PatternMatcher matcher
Perl pattern matcher object


compiler

protected com.oroinc.text.regex.PatternCompiler compiler
Perl pattern match compiler


file

java.io.File file
File handle for the logfile


prevLen

long prevLen

newLen

long newLen
Constructor Detail

AgentServerLogEventDetector

public AgentServerLogEventDetector(ConfigObject configObj)
Default constructor for the AgentServerLogEventDetector.


AgentServerLogEventDetector

public AgentServerLogEventDetector(java.lang.String logFileName,
                                   ConfigObject configObj)
Constructor for the AgentServerLogDetector.

Parameters:
logFileName - Name of the AgentServer logfile
Method Detail

getGeneratingEventClassName

public java.lang.String getGeneratingEventClassName()
Function which returns the generated Event Class name

Specified by:
getGeneratingEventClassName in class EventDetector
Returns:
Event Class is returned as a string

generateEvent

public java.util.Vector generateEvent(network.events.Event triggerringEvent)
Generates an

Specified by:
generateEvent in class EventDetector
Parameters:
triggerringEvent -
Returns:
Event Class is returned as a string

readLogFile

private java.util.Vector readLogFile()
Returns:

match

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

populatePatterns

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

addMonths

private void addMonths()
Returns: