network.detectors
Class FileConsistencyEventDetector

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

public class FileConsistencyEventDetector
extends EventDetector
implements java.io.Serializable

This detector hashes all files in /usr/bin and recalculates the hashes periodically. If a file's hash does not match its previous hash, a FileConsistencyEvent is generated.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class network.detectors.EventDetector
agentURN, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable
 
Method Summary
 java.util.Vector generateEvent(Event triggeredEvent)
          This method will generate a FileConsistencyEvent if the previous hash of a file does not match the current hash.
 java.lang.String getGeneratingEventClassName()
          Returns the fully-qualified classname of the event that this detector may generate.
protected  byte[] serialize(java.lang.Object X)
          Serializes an Object into a byte array.
 
Methods inherited from class network.detectors.EventDetector
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, modifyDetector, populatePatterns, 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
 

Method Detail

getGeneratingEventClassName

public java.lang.String getGeneratingEventClassName()
Returns the fully-qualified classname of the event that this detector may generate.

Specified by:
getGeneratingEventClassName in class EventDetector
Returns:
the fully-qualified classname of the event that this detector may generate.

serialize

protected byte[] serialize(java.lang.Object X)
Serializes an Object into a byte array.

Parameters:
X - the Object to serialize.
Returns:
serialized byte array representing the original object.

generateEvent

public java.util.Vector generateEvent(Event triggeredEvent)
This method will generate a FileConsistencyEvent if the previous hash of a file does not match the current hash.

Specified by:
generateEvent in class EventDetector
Parameters:
triggeredEvent - the event that triggered the detector.
Returns:
a vector of FileConsistencyEvents.