|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.LinkdConfigManager
public abstract class LinkdConfigManager
Abstract LinkdConfigManager class.
| Field Summary | |
|---|---|
static String |
DEFAULT_IP_ROUTE_CLASS_NAME
|
protected static LinkdConfiguration |
m_config
Object containing all Linkd-configuration objects parsed from the XML file |
| Constructor Summary | |
|---|---|
LinkdConfigManager(InputStream stream)
Constructor for LinkdConfigManager. |
|
| Method Summary | |
|---|---|
boolean |
enableDiscoveryDownload()
enableDiscoveryDownload |
Enumeration<Package> |
enumeratePackage()
enumeratePackage |
boolean |
forceIpRouteDiscoveryOnEthernet()
|
List<String> |
getAllPackageMatches(InetAddress ipaddr)
Returns true if the IP is part of at least one package. |
LinkdConfiguration |
getConfiguration()
Return the linkd configuration object. |
String |
getDefaultIpRouteClassName()
|
long |
getDiscoveryLinkInterval()
getDiscoveryLinkInterval |
Package |
getFirstPackageMatch(InetAddress ipaddr)
Returns the first package that the ip belongs to, null if none. |
long |
getInitialSleepTime()
getInitialSleepTime |
List<InetAddress> |
getIpList(Package pkg)
Determine the list of IPs the filter rule for this package allows |
String |
getIpRouteClassName(String sysoid)
|
Package |
getPackage(String name)
getPackage |
Lock |
getReadLock()
|
long |
getSnmpPollInterval()
getSnmpPollInterval |
int |
getThreads()
getThreads |
String |
getVlanClassName(String sysoid)
getVlanClassName |
Lock |
getWriteLock()
|
boolean |
hasClassName(String sysoid)
hasClassName |
boolean |
hasIpRouteClassName(String sysoid)
|
boolean |
isAutoDiscoveryEnabled()
Whether autodiscovery is enabled in linkd-config (default: false) |
boolean |
isInterfaceInPackage(InetAddress iface,
Package pkg)
This method is used to determine if the named interface is included in the passed package definition. |
boolean |
isInterfaceInPackageRange(InetAddress iface,
Package pkg)
This method is used to determine if the named interface is included in the passed package definition. |
boolean |
isVlanDiscoveryEnabled()
Whether vlan discovery is enabled in linkd-config (default: true) |
protected void |
reloadXML(InputStream stream)
reloadXML |
protected void |
reloadXML(Reader reader)
Deprecated. |
void |
save()
Saves the current in-memory configuration to disk and reloads |
boolean |
saveRouteTable()
saveRouteTable |
boolean |
saveStpInterfaceTable()
saveStpInterfaceTable |
boolean |
saveStpNodeTable()
saveStpNodeTable |
protected abstract void |
saveXml(String xml)
saveXml |
abstract void |
update()
update |
void |
updatePackageIpListMap()
This method is used to establish package against IP list mapping, with which, the IP list is selected per package via the configured filter rules from the database. |
boolean |
useBridgeDiscovery()
useBridgeDiscovery |
boolean |
useCdpDiscovery()
useCdpDiscovery |
boolean |
useIpRouteDiscovery()
useIpRouteDiscovery |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_IP_ROUTE_CLASS_NAME
protected static LinkdConfiguration m_config
| Constructor Detail |
|---|
public LinkdConfigManager(InputStream stream)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
Constructor for LinkdConfigManager.
stream - a InputStream object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.| Method Detail |
|---|
public Lock getReadLock()
getReadLock in interface LinkdConfigpublic Lock getWriteLock()
getWriteLock in interface LinkdConfigpublic boolean isAutoDiscoveryEnabled()
isAutoDiscoveryEnabled in interface LinkdConfigpublic boolean isVlanDiscoveryEnabled()
isVlanDiscoveryEnabled in interface LinkdConfig
public boolean isInterfaceInPackage(InetAddress iface,
Package pkg)
isInterfaceInPackage in interface LinkdConfigiface - The interface to test against the package.pkg - The package to check for the inclusion of the interface.
public boolean isInterfaceInPackageRange(InetAddress iface,
Package pkg)
LinkdConfig
isInterfaceInPackageRange in interface LinkdConfigiface - The interface to test against the package.pkg - The package to check for the inclusion of the interface.
public Enumeration<Package> enumeratePackage()
enumeratePackage
enumeratePackage in interface LinkdConfigEnumeration object.public LinkdConfiguration getConfiguration()
getConfiguration in interface LinkdConfigLinkdConfiguration object.public Package getPackage(String name)
getPackage
getPackage in interface LinkdConfigname - a String object.
Package object.public List<InetAddress> getIpList(Package pkg)
getIpList in interface LinkdConfigpkg - a Package object.
List object.public String getIpRouteClassName(String sysoid)
getIpRouteClassName in interface LinkdConfigpublic String getVlanClassName(String sysoid)
getVlanClassName
getVlanClassName in interface LinkdConfigsysoid - a String object.
String object.public Package getFirstPackageMatch(InetAddress ipaddr)
getFirstPackageMatch in interface LinkdConfigipaddr - the interface to check
public List<String> getAllPackageMatches(InetAddress ipaddr)
getAllPackageMatches in interface LinkdConfigipaddr - a String object.
public boolean hasClassName(String sysoid)
hasClassName
hasClassName in interface LinkdConfigsysoid - a String object.
public String getDefaultIpRouteClassName()
getDefaultIpRouteClassName in interface LinkdConfig
public abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
update
update in interface LinkdConfigIOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.public void updatePackageIpListMap()
updatePackageIpListMap in interface LinkdConfigpublic boolean useIpRouteDiscovery()
useIpRouteDiscovery
useIpRouteDiscovery in interface LinkdConfigpublic boolean saveRouteTable()
saveRouteTable
saveRouteTable in interface LinkdConfigpublic boolean useCdpDiscovery()
useCdpDiscovery
useCdpDiscovery in interface LinkdConfigpublic boolean useBridgeDiscovery()
useBridgeDiscovery
useBridgeDiscovery in interface LinkdConfigpublic boolean saveStpNodeTable()
saveStpNodeTable
saveStpNodeTable in interface LinkdConfigpublic boolean enableDiscoveryDownload()
enableDiscoveryDownload
enableDiscoveryDownload in interface LinkdConfigpublic boolean saveStpInterfaceTable()
saveStpInterfaceTable
saveStpInterfaceTable in interface LinkdConfigpublic long getInitialSleepTime()
LinkdConfiggetInitialSleepTime
getInitialSleepTime in interface LinkdConfigpublic long getSnmpPollInterval()
LinkdConfiggetSnmpPollInterval
getSnmpPollInterval in interface LinkdConfigpublic long getDiscoveryLinkInterval()
LinkdConfiggetDiscoveryLinkInterval
getDiscoveryLinkInterval in interface LinkdConfigpublic int getThreads()
getThreads
getThreads in interface LinkdConfigpublic boolean hasIpRouteClassName(String sysoid)
hasIpRouteClassName in interface LinkdConfig
@Deprecated
protected void reloadXML(Reader reader)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
reloadXML
reader - a Reader object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
protected void reloadXML(InputStream stream)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
reloadXML
stream - a InputStream object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public void save()
throws org.exolab.castor.xml.MarshalException,
IOException,
org.exolab.castor.xml.ValidationException
save in interface LinkdConfigorg.exolab.castor.xml.MarshalException - if any.
IOException - if any.
org.exolab.castor.xml.ValidationException - if any.
protected abstract void saveXml(String xml)
throws IOException
saveXml
xml - a String object.
IOException - if any.public boolean forceIpRouteDiscoveryOnEthernet()
forceIpRouteDiscoveryOnEthernet in interface LinkdConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||