campus.compass
Class CompassService
java.lang.Object
|
+--solar.service.BaseService
|
+--campus.compass.CompassService
- All Implemented Interfaces:
- EventHandler, RequestHandler, java.lang.Runnable, Service
- public class CompassService
- extends BaseService
- implements java.lang.Runnable
Compass service provides a Web proxy that impose location-dependent
information on the pages viewed by the clients. The implementation
is based on Muffin (http://muffin.doit.org/).
- Version:
- $Id: CompassService.java,v 1.8 2003/09/21 03:13:35 glchen Exp $
- Author:
- Guanling Chen
Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, handleEvent, handleRequest, hasInited, init, initDependents, setInited, setName, setServiceManager, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
_log
protected static org.apache.log4j.Logger _log
_locfile
protected static java.lang.String _locfile
_loctable
protected static java.util.Hashtable _loctable
_sysloghost
protected java.lang.String _sysloghost
_syslogport
protected int _syslogport
_snmpscript
protected java.lang.String _snmpscript
_community
protected java.lang.String _community
_mappath
protected java.lang.String _mappath
_snmploc
protected static SnmpLocator _snmploc
_map
protected static CampusMap _map
_needparse
protected static boolean _needparse
_parser
protected static SyslogParser _parser
CompassService
public CompassService()
init
public void init()
throws ServiceException
- Description copied from interface:
Service
- Initiate the service, do not try to init dependent services here.
- Specified by:
init
in interface Service
- Overrides:
init
in class BaseService
ServiceException
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getApStatByIp
public static ApStat getApStatByIp(java.lang.String ip)
getApByIp
public static java.lang.String getApByIp(java.lang.String ip)
getLocationByIp
public static Location getLocationByIp(java.lang.String ip)
throws java.lang.Exception
java.lang.Exception
addIpLocation
private static void addIpLocation(java.lang.String ip,
Location loc)