public abstract class LinkdConfigManager extends Object implements LinkdConfig
Abstract LinkdConfigManager class.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_IP_ROUTE_CLASS_NAME |
protected static LinkdConfiguration |
m_config
Object containing all Linkd-configuration objects parsed from the XML
file
|
| Constructor and Description |
|---|
LinkdConfigManager()
Constructor for LinkdConfigManager.
|
| Modifier and Type | Method and Description |
|---|---|
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)
|
boolean |
saveRouteTable()
saveRouteTable
|
boolean |
saveStpInterfaceTable()
saveStpInterfaceTable
|
boolean |
saveStpNodeTable()
saveStpNodeTable
|
protected abstract void |
saveXml(String xml)
saveXml
|
abstract void |
update()
update
|
protected void |
updateIpRouteClassNames() |
protected 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.
|
protected void |
updateUrlIpMap() |
protected void |
updateVlanClassNames() |
boolean |
useBridgeDiscovery()
useBridgeDiscovery
|
boolean |
useCdpDiscovery()
useCdpDiscovery
|
boolean |
useIpRouteDiscovery()
useIpRouteDiscovery
|
boolean |
useIsIsDiscovery()
useIsIsDiscovery
|
boolean |
useLldpDiscovery()
useLldpDiscovery
|
boolean |
useOspfDiscovery()
useOspfDiscovery
|
boolean |
useWifiDiscovery()
useWifiDiscovery
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreload, savepublic static final String DEFAULT_IP_ROUTE_CLASS_NAME
protected static LinkdConfiguration m_config
public LinkdConfigManager()
Constructor for LinkdConfigManager.
stream - a InputStream object.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.IOException - if any.public Lock getReadLock()
getReadLock in interface LinkdConfigpublic Lock getWriteLock()
getWriteLock in interface LinkdConfigpublic boolean isAutoDiscoveryEnabled()
isAutoDiscoveryEnabled in interface LinkdConfigpublic boolean isVlanDiscoveryEnabled()
isVlanDiscoveryEnabled in interface LinkdConfigpublic 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)
LinkdConfigisInterfaceInPackageRange 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 checkpublic 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 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 useLldpDiscovery()
useLldpDiscovery
useLldpDiscovery in interface LinkdConfigpublic boolean useOspfDiscovery()
useOspfDiscovery
useOspfDiscovery in interface LinkdConfigpublic boolean useIsIsDiscovery()
useIsIsDiscovery
useIsIsDiscovery in interface LinkdConfigpublic boolean useWifiDiscovery()
useWifiDiscovery
useWifiDiscovery in interface LinkdConfigpublic boolean saveStpNodeTable()
saveStpNodeTable
saveStpNodeTable 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 LinkdConfigpublic abstract void update()
update
update in interface LinkdConfigprotected void updatePackageIpListMap()
protected void updateUrlIpMap()
protected void updateIpRouteClassNames()
protected void updateVlanClassNames()
protected abstract void saveXml(String xml) throws IOException
saveXml
xml - a String object.IOException - if any.public boolean forceIpRouteDiscoveryOnEthernet()
forceIpRouteDiscoveryOnEthernet in interface LinkdConfigCopyright © 2015. All rights reserved.