|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.discovery.DiscoveredIPMgr
This class represents a singular instance that is used to check address to determine their pollablility. If the address has already been discovered or is part of the exclude list then the manager can be used to check.
Nested Class Summary | |
(package private) static class |
DiscoveredIPMgr.AddrComparator
This class implements the Comparator
interface and provides the infomation required for a Tree to be sorted. |
Field Summary | |
private static java.lang.String |
IP_LOAD_SQL
The SQL statement used to extract the list of currently known IP addresses from the IP Interface table. |
private static java.util.Set |
m_discovered
The set of all discovered addresses |
private static ExcludeRange[] |
m_excluded
The list of all excluded ranges. |
private static java.util.List |
m_specifics
The list of specific addresses. |
Constructor Summary | |
private |
DiscoveredIPMgr()
Default construct for the instance. |
Method Summary | |
(package private) static boolean |
addDiscovered(java.net.InetAddress addr)
Adds a new address to the list of discovered address. |
(package private) static boolean |
addDiscovered(java.lang.String addr)
Adds a new address to the list of discovered address. |
(package private) static void |
dataSourceSync()
Clears and synchronizes the internal known IP address cache with the current information contained in the database. |
(package private) static boolean |
isDiscovered(java.net.InetAddress addr)
Returns true if the node has been discovered and added to the discovered IP manager. |
(package private) static boolean |
isDiscovered(java.lang.String ipAddr)
Returns true if the node has been discovered and added to the discovered IP manager. |
(package private) static boolean |
isDiscoveredOrExcluded(java.net.InetAddress addr)
Returns true if the passed address is either excluded or has already been discovered. |
(package private) static boolean |
isDiscoveredOrExcluded(java.lang.String addr)
Returns true if the passed address is either excluded or has already been discovered. |
(package private) static boolean |
isExcluded(java.net.InetAddress addr)
Returns true if the passed address is included in the range of addresses to be skipped and is not contained within the specifcs address list (which takes precedence over the exclude ranges. |
(package private) static boolean |
isExcluded(java.lang.String ipAddr)
Returns true if the passed address is included in the range of addresses to be skipped. |
(package private) static boolean |
removeDiscovered(java.net.InetAddress addr)
Removes an address from the list of discovered address. |
(package private) static boolean |
removeDiscovered(java.lang.String addr)
Removes an address from the list of discovered address. |
(package private) static void |
setExclusionList(ExcludeRange[] ranges)
Set the exclusion list used to determine if an IP Address has been excluded. |
(package private) static void |
setSpecificsList(java.util.List specifics)
Set the specifics list used to determine if an IP Address has been excluded (& not specifically included). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String IP_LOAD_SQL
private static java.util.Set m_discovered
private static ExcludeRange[] m_excluded
private static java.util.List m_specifics
Constructor Detail |
private DiscoveredIPMgr()
java.lang.UnsupportedOperationException
- Always thrown.Method Detail |
static void dataSourceSync() throws java.sql.SQLException
java.sql.SQLException
- Thrown if the connection cannot be created or a database
error occurs.static void setExclusionList(ExcludeRange[] ranges)
ranges
- The list of excluded rangesstatic void setSpecificsList(java.util.List specifics)
specifics
- The list of specific addressesstatic boolean isDiscovered(java.net.InetAddress addr)
addr
- The IP Address to query.
static boolean isDiscovered(java.lang.String ipAddr) throws java.net.UnknownHostException
java.net.InetAddressInetAddress
instance then an exception is
generated.
ipAddr
- The IP Address to query.
java.io.UnknownHostException
- Thrown if the address name could not be converted.
java.net.UnknownHostException
static boolean isExcluded(java.net.InetAddress addr)
addr
- The address to check for exclusion
static boolean isExcluded(java.lang.String ipAddr) throws java.net.UnknownHostException
ipAddr
- The address to check for exclusion
java.net.UnknownHostException
- Thrown if the string address could not be converted to an
InetAddress.static boolean isDiscoveredOrExcluded(java.net.InetAddress addr)
addr
- The address to check
java.net.UnknownHostException
- Thrown if the address cannot be converted to an InetAddress.static boolean isDiscoveredOrExcluded(java.lang.String addr) throws java.net.UnknownHostException
addr
- The address to check
java.net.UnknownHostException
- Thrown if the address cannot be converted to an InetAddress.static boolean addDiscovered(java.net.InetAddress addr)
addr
- The address to add to the discovered set.
static boolean addDiscovered(java.lang.String addr) throws java.net.UnknownHostException
addr
- The address to add to the discovered set.
java.net.UnknownHost
- Thrown if the address cannot be converted.
java.net.UnknownHostException
static boolean removeDiscovered(java.net.InetAddress addr)
addr
- The address to remove from the discovered set.
static boolean removeDiscovered(java.lang.String addr) throws java.net.UnknownHostException
addr
- The address to remove from the discovered set.
java.net.UnknownHost
- Thrown if the address cannot be converted.
java.net.UnknownHostException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |