konark.detectors
Class AgentAliveEventDetector

java.lang.Object
  extended bykonark.detectors.EventDetector
      extended bykonark.detectors.AgentAliveEventDetector
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class AgentAliveEventDetector
extends EventDetector

The AgentAliveEvent Detector periodically checks to see if detectors in an agent have died by checking that the number of threads in an agent never decreases.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class konark.detectors.EventDetector
agentURN, blueToothLogFileName, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable
 
Constructor Summary
AgentAliveEventDetector(ConfigObject configObj)
          The default constructor.
 
Method Summary
 Event createEvent(java.util.Vector activeThreadList, long timeOut, java.util.Vector subList)
           
 java.util.Vector generateEvent(Event triggeredEvent)
          Possibly generates a AgentAliveEvent.
 java.lang.String getGeneratingEventClassName()
          Returns the event name that will be generated.
 java.util.Vector getRunningThreads()
          Returns a vector of currently running threads.
 void increaseSequenceNumber()
          Increases the sequence number of times when the count didn't match.
 
Methods inherited from class konark.detectors.EventDetector
getAlarmLevel, getAlertLevel, getBlueToothLogFileLocation, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getRFIDLogFileLocation, getSynchronizer, InitializeFields, modifyDetector, populatePatterns, printRunningThreads, run, setAgentURN, setAlarmLevel, setAlertLevel, setBlueToothLogFileLocation, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, setRFIDLogFileLocation, stopDetector, switchOffPrintRunningThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentAliveEventDetector

public AgentAliveEventDetector(ConfigObject configObj)
The default constructor.

Method Detail

getGeneratingEventClassName

public java.lang.String getGeneratingEventClassName()
Returns the event name that will be generated.

Specified by:
getGeneratingEventClassName in class EventDetector
Returns:
event name to be generated.

generateEvent

public java.util.Vector generateEvent(Event triggeredEvent)
Possibly generates a AgentAliveEvent. Is triggered by a TimerEvent. Counts the number of active threads, and if that number does not match the previous count, it signals that a detector has died.

Specified by:
generateEvent in class EventDetector
Parameters:
triggeredEvent - the triggering event (will be a TimerEvent).

createEvent

public Event createEvent(java.util.Vector activeThreadList,
                         long timeOut,
                         java.util.Vector subList)

increaseSequenceNumber

public void increaseSequenceNumber()
Increases the sequence number of times when the count didn't match.


getRunningThreads

public java.util.Vector getRunningThreads()
Returns a vector of currently running threads.

Returns:
vector of currently running threads.