|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.VulnscandConfigFactory
public final class VulnscandConfigFactory
This is the singleton class used to load the configuration for the OpenNMS Vulnscand service from the vulnscand-configuration xml file. Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods.
| Method Summary | |
|---|---|
void |
addRange(int level,
InetAddress begin,
InetAddress end)
|
void |
addRange(ScanLevel level,
InetAddress begin,
InetAddress end)
|
void |
addSpecific(int level,
InetAddress specific)
|
void |
addSpecific(ScanLevel level,
InetAddress specific)
|
Set |
getAllExcludes()
|
Set |
getAllIpAddresses(int level)
|
Set |
getAllIpAddresses(ScanLevel level)
|
static VulnscandConfiguration |
getConfiguration()
Return the Vulnscand configuration object. |
long |
getInitialSleepTime()
|
static VulnscandConfigFactory |
getInstance()
Return the singleton instance of this factory. |
static int |
getInterfaceDbNodeId(Connection dbConn,
InetAddress ifAddress)
|
int |
getManagedInterfacesScanLevel()
|
boolean |
getManagedInterfacesStatus()
|
int |
getMaxRescanThreadPoolSize()
|
int |
getMaxSuspectThreadPoolSize()
|
String[] |
getPluginLists()
Gets the cached value of the plugin lists in the config file |
long |
getRescanFrequency()
|
boolean[] |
getSafeChecks()
Gets the cached value of the safe checks settings in the config file |
InetAddress |
getServerAddress()
|
String |
getServerPassword()
|
int |
getServerPort()
|
String |
getServerUsername()
|
boolean |
getStatus()
|
static void |
init()
Load the config from the default config file and create the singleton instance of this factory. |
static boolean |
isInterfaceInDB(Connection dbConn,
InetAddress ifAddress)
|
static void |
reload()
Reload the config from the default config file |
void |
removeExcludeRange(InetAddress begin,
InetAddress end)
|
void |
removeExcludeSpecific(InetAddress specific)
|
void |
removeRange(int level,
InetAddress begin,
InetAddress end)
|
void |
removeRange(ScanLevel level,
InetAddress begin,
InetAddress end)
|
void |
removeSpecific(int level,
InetAddress specific)
|
void |
removeSpecific(ScanLevel level,
InetAddress specific)
|
static void |
saveCurrent()
Saves the current settings to disk |
static InetAddress |
toInetAddress(long address)
Converts a 64-bit unsigned quantity to a IPv4 dotted decimal string address. |
static long |
toLong(InetAddress addr)
Deprecated. See org.opennms.core.utils.InetAddressCollection.toLong(InetAddress addr) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be read
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
public static void reload()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be read/loaded
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
public static void saveCurrent()
throws Exception
Exceptionpublic static VulnscandConfigFactory getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static VulnscandConfiguration getConfiguration()
public static long toLong(InetAddress addr)
long value. The address is converted in network byte order
(big endin). This is compatable with the number format of the JVM, and
thus the return longs can be compared with other converted IP Addresses
to determine inclusion.
addr - The IP address to convert.
public static InetAddress toInetAddress(long address)
throws UnknownHostException
Converts a 64-bit unsigned quantity to a IPv4 dotted decimal string address.
address - The 64-bit quantity to convert.
UnknownHostException
public static boolean isInterfaceInDB(Connection dbConn,
InetAddress ifAddress)
throws SQLException
SQLException
public static int getInterfaceDbNodeId(Connection dbConn,
InetAddress ifAddress)
throws SQLException
SQLException
public void addSpecific(int level,
InetAddress specific)
public void addSpecific(ScanLevel level,
InetAddress specific)
public void addRange(int level,
InetAddress begin,
InetAddress end)
public void addRange(ScanLevel level,
InetAddress begin,
InetAddress end)
public void removeSpecific(int level,
InetAddress specific)
public void removeSpecific(ScanLevel level,
InetAddress specific)
public void removeRange(int level,
InetAddress begin,
InetAddress end)
public void removeRange(ScanLevel level,
InetAddress begin,
InetAddress end)
public Set getAllIpAddresses(int level)
public Set getAllIpAddresses(ScanLevel level)
public Set getAllExcludes()
public void removeExcludeRange(InetAddress begin,
InetAddress end)
public void removeExcludeSpecific(InetAddress specific)
public long getRescanFrequency()
public long getInitialSleepTime()
public InetAddress getServerAddress()
public String[] getPluginLists()
public boolean[] getSafeChecks()
public int getServerPort()
public String getServerUsername()
public String getServerPassword()
public boolean getStatus()
public boolean getManagedInterfacesStatus()
public int getManagedInterfacesScanLevel()
public int getMaxSuspectThreadPoolSize()
public int getMaxRescanThreadPoolSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||