network.detectors
Class  TimerEventDetector
java.lang.Object
  |
  +--network.detectors.EventDetector
        |
        +--network.detectors.TimerEventDetector
- All Implemented Interfaces: 
 - java.lang.Runnable, java.io.Serializable
 
- public class TimerEventDetector
- extends EventDetector
- implements java.io.Serializable, java.lang.Runnable
   
- See Also:
 - Serialized Form
 
| 
Field Summary | 
(package private)  boolean | 
runFlag
 
            | 
(package private)  long | 
timeOut
 
            | 
 
| Fields inherited from class network.detectors.EventDetector | 
agentURN, attempts, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, printRunningThreadsFlag, remoteTriggeringEvents, reportTable | 
 
 
| 
Method Summary | 
 java.util.Vector | 
generateEvent(network.events.Event triggeredEvent)
 
            | 
 java.lang.String | 
getGeneratingEventClassName()
 
            | 
static java.lang.String | 
getModifyDetectorObjectList()
 
            | 
static java.lang.String[] | 
getParamList()
 
          Returns array of strings containing all the parameters that can be used 
 as input to modify this detector. | 
 void | 
modifyDetector(java.lang.Object[] object)
 
          Allows modification of detector configuration by passing a Long object of milliseconds for the new time out. | 
 void | 
run()
 
            | 
 void | 
setTimeoutPeriod(long time)
 
            | 
 void | 
stopDetector()
 
            | 
static java.lang.Object[] | 
translateParameters(java.lang.String[] inputarray)
 
          This function takes an array of strings from GUI which contains input and converts them to array of objects
 and returns. | 
 
| Methods inherited from class network.detectors.EventDetector | 
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, populatePatterns, printRunningThreads, setAgentURN, setAlarmLevel, setAlertLevel, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, switchOffPrintRunningThreads | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
timeOut
long timeOut
runFlag
boolean runFlag
TimerEventDetector
public TimerEventDetector(ConfigObject configObj)
                   throws java.lang.Exception
TimerEventDetector
public TimerEventDetector(long timeoutPeriod,
                          ConfigObject configObj)
- Parameters:
 timeoutPeriod - 
TimerEventDetector
public TimerEventDetector(java.lang.String timeoutPeriodString,
                          ConfigObject configObj)
- Parameters:
 timeoutPeriodString - 
setTimeoutPeriod
public void setTimeoutPeriod(long time)
 
- Parameters:
 time - 
- Returns:
 
 
getGeneratingEventClassName
public java.lang.String getGeneratingEventClassName()
- Specified by:
 getGeneratingEventClassName in class EventDetector
 
- Returns:
 
 
generateEvent
public java.util.Vector generateEvent(network.events.Event triggeredEvent)
- Specified by:
 generateEvent in class EventDetector
 
- Parameters:
 triggeredEvent - 
- Returns:
 
 
getParamList
public static java.lang.String[] getParamList()
- Returns array of strings containing all the parameters that can be used 
 as input to modify this detector. Each entry in the array corresponds to 
 one parameter with structure " : ".
 
- Returns:
 - parameterList, an array of Strings indicating parameters and their types
 
 
 
stopDetector
public void stopDetector()
- Overrides:
 stopDetector in class EventDetector
 
- Returns:
 
 
translateParameters
public static java.lang.Object[] translateParameters(java.lang.String[] inputarray)
                                              throws java.lang.Exception
- This function takes an array of strings from GUI which contains input and converts them to array of objects
 and returns.
 
- Parameters:
 inputarray - an array of strings that contains user inputs.
- Returns:
 - objArray an array of objects converted from the array of strings got from user.
java.lang.Exception 
 
 
modifyDetector
public void modifyDetector(java.lang.Object[] object)
                    throws java.lang.Exception
- Allows modification of detector configuration by passing a Long object of milliseconds for the new time out.
- Overrides:
 modifyDetector in class EventDetector
 
- Parameters:
 object - an array of Objects with a Long object as the only parameter
- Returns:
 - 
java.lang.Exception 
 
 
getModifyDetectorObjectList
public static java.lang.String getModifyDetectorObjectList()
 
 
run
public void run()
- Specified by:
 run in interface java.lang.Runnable- Overrides:
 run in class EventDetector
 
- Returns: