campus.sysnort.trigger
Class HotspotTrigger

java.lang.Object
  |
  +--campus.sysnort.Trigger
        |
        +--campus.sysnort.trigger.HotspotTrigger
All Implemented Interfaces:
SyslogConstants

public class HotspotTrigger
extends Trigger
implements SyslogConstants

Monitors the number of clients on the APs and update the hotspot plots periodically.

Version:
$Id: HotspotTrigger.java,v 1.4 2003/09/08 23:50:35 glchen Exp $
Author:
Guanling Chen

Field Summary
protected  java.util.Hashtable _aps
           
protected  boolean _blocking
           
protected  java.util.Hashtable _clients
           
protected  long _clock
           
protected  java.lang.String _datafile
           
protected  int _hotThreshold
           
protected  java.lang.String _makefile
           
protected  java.lang.String _plotpath
           
protected  int _plotRate
           
protected  java.lang.Process _process
           
 
Fields inherited from class campus.sysnort.Trigger
_actionObject, _name
 
Fields inherited from interface campus.syslog.SyslogConstants
BASE, EVT_ACTION, EVT_APNAME, EVT_CLIENTHOST, EVT_CLIENTMAC, EVT_DAY, EVT_MONTH, EVT_MSGTYPE, EVT_NOTE, EVT_TIME, EVT_TIMESTAMP, EVT_YEAR, IDX_ACTION, IDX_APNAME, IDX_CLIENTHOST, IDX_CLIENTMAC, IDX_DAY, IDX_MONTH, IDX_MSGTYPE, IDX_NOTE, IDX_TIME, IDX_TIMESTAMP, IDX_YEAR, TAG_ASSOCIATED, TAG_AUTHENTICATED, TAG_DEASSOCIATING, TAG_DEASSOCIATION, TAG_DEAUTHENTICATING, TAG_DEAUTHENTICATION, TAG_FATAL, TAG_INACTIVITY, TAG_INFO, TAG_REASSOCIATED, TAG_REPEAT_LAST_MSG, TAG_ROAMED, TAG_SYSLOG, TAG_WARNING
 
Constructor Summary
HotspotTrigger()
           
 
Method Summary
 boolean checkCondition(Event evt)
          Check whether the new event satisfy this trigger's condition.
 void init(serp.util.Options opts)
          Init the trigger with customized arguments in configuration.
 void takeAction(java.lang.Object actionObject)
          When the checkCondition returns true, Sysnort retrieves the action object and may call takeAction immediately or defer to a later time.
private  int updateCounter(java.lang.String apname, int delta)
           
 
Methods inherited from class campus.sysnort.Trigger
getActionObject, getName, getPackPolicy, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_aps

protected java.util.Hashtable _aps

_clients

protected java.util.Hashtable _clients

_plotRate

protected int _plotRate

_hotThreshold

protected int _hotThreshold

_datafile

protected java.lang.String _datafile

_plotpath

protected java.lang.String _plotpath

_makefile

protected java.lang.String _makefile

_blocking

protected boolean _blocking

_clock

protected long _clock

_process

protected java.lang.Process _process
Constructor Detail

HotspotTrigger

public HotspotTrigger()
Method Detail

init

public void init(serp.util.Options opts)
          throws java.lang.Exception
Description copied from class: Trigger
Init the trigger with customized arguments in configuration.

Overrides:
init in class Trigger
java.lang.Exception

checkCondition

public boolean checkCondition(Event evt)
                       throws java.lang.Exception
Description copied from class: Trigger
Check whether the new event satisfy this trigger's condition. If yes, then this function returns true. The subclass must also encapsulate all the information to take action in the object _actionObject, which will be used by Sysnort to call takeAction.

Specified by:
checkCondition in class Trigger
java.lang.Exception

updateCounter

private int updateCounter(java.lang.String apname,
                          int delta)

takeAction

public void takeAction(java.lang.Object actionObject)
                throws java.lang.Exception
Description copied from class: Trigger
When the checkCondition returns true, Sysnort retrieves the action object and may call takeAction immediately or defer to a later time.

Specified by:
takeAction in class Trigger
java.lang.Exception