|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.ThreshdConfigManager
public abstract class ThreshdConfigManager
| Field Summary | |
|---|---|
protected ThreshdConfiguration |
m_config
The config class loaded from the config file |
protected String |
m_localServer
The name of the local OpenNMS server |
protected boolean |
m_verifyServer
A boolean flag to indicate If a filter rule against the local OpenNMS server has to be used. |
| Constructor Summary | |
|---|---|
ThreshdConfigManager(Reader rdr,
String localServer,
boolean verifyServer)
|
|
| Method Summary | |
|---|---|
protected void |
createPackageIpListMap()
This method is used to establish package against an iplist iplist mapping, with which, the iplist is selected per package via the configured filter rules from the database. |
protected void |
createUrlIpMap()
Go through the configuration and build a mapping of each configured URL to a list of IPs configured in that URL - done at init() time so that repeated file reads can be avoided |
ThreshdConfiguration |
getConfiguration()
Return the threshd configuration object. |
Package |
getPackage(String name)
|
boolean |
interfaceInPackage(String iface,
Package pkg)
This method is used to determine if the named interface is included in the passed package definition. |
void |
rebuildPackageIpListMap()
This nethod is used to rebuild the package agaist iplist mapping when needed. |
abstract void |
reloadXML()
|
void |
saveCurrent()
Saves the current in-memory configuration to disk and reloads |
protected abstract void |
saveXML(String xmlString)
|
boolean |
serviceInPackageAndEnabled(String svcName,
Package pkg)
Returns true if the service is part of the package and the status of the service is set to "on". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ThreshdConfiguration m_config
protected boolean m_verifyServer
protected String m_localServer
| Constructor Detail |
|---|
public ThreshdConfigManager(Reader rdr,
String localServer,
boolean verifyServer)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException| Method Detail |
|---|
protected void createUrlIpMap()
protected void createPackageIpListMap()
public void rebuildPackageIpListMap()
public void saveCurrent()
throws org.exolab.castor.xml.MarshalException,
IOException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
IOException
org.exolab.castor.xml.ValidationException
public abstract void reloadXML()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
protected abstract void saveXML(String xmlString)
throws IOException
IOExceptionpublic ThreshdConfiguration getConfiguration()
public Package getPackage(String name)
public boolean interfaceInPackage(String iface,
Package pkg)
iface - The interface to test against the package.pkg - The package to check for the inclusion of the interface.
public boolean serviceInPackageAndEnabled(String svcName,
Package pkg)
svcName - The service name to lookup.pkg - The package to lookup up service.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||