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, wait
reload, save
public 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 LinkdConfig
public Lock getWriteLock()
getWriteLock
in interface LinkdConfig
public boolean isAutoDiscoveryEnabled()
isAutoDiscoveryEnabled
in interface LinkdConfig
public boolean isVlanDiscoveryEnabled()
isVlanDiscoveryEnabled
in interface LinkdConfig
public boolean isInterfaceInPackage(InetAddress iface, Package pkg)
isInterfaceInPackage
in interface LinkdConfig
iface
- 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 LinkdConfig
iface
- 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 LinkdConfig
Enumeration
object.public LinkdConfiguration getConfiguration()
getConfiguration
in interface LinkdConfig
LinkdConfiguration
object.public Package getPackage(String name)
getPackage
getPackage
in interface LinkdConfig
name
- a String
object.Package
object.public List<InetAddress> getIpList(Package pkg)
getIpList
in interface LinkdConfig
pkg
- a Package
object.List
object.public String getIpRouteClassName(String sysoid)
getIpRouteClassName
in interface LinkdConfig
public String getVlanClassName(String sysoid)
getVlanClassName
getVlanClassName
in interface LinkdConfig
sysoid
- a String
object.String
object.public Package getFirstPackageMatch(InetAddress ipaddr)
getFirstPackageMatch
in interface LinkdConfig
ipaddr
- the interface to checkpublic List<String> getAllPackageMatches(InetAddress ipaddr)
getAllPackageMatches
in interface LinkdConfig
ipaddr
- a String
object.public boolean hasClassName(String sysoid)
hasClassName
hasClassName
in interface LinkdConfig
sysoid
- a String
object.public String getDefaultIpRouteClassName()
getDefaultIpRouteClassName
in interface LinkdConfig
public boolean useIpRouteDiscovery()
useIpRouteDiscovery
useIpRouteDiscovery
in interface LinkdConfig
public boolean saveRouteTable()
saveRouteTable
saveRouteTable
in interface LinkdConfig
public boolean useCdpDiscovery()
useCdpDiscovery
useCdpDiscovery
in interface LinkdConfig
public boolean useBridgeDiscovery()
useBridgeDiscovery
useBridgeDiscovery
in interface LinkdConfig
public boolean useLldpDiscovery()
useLldpDiscovery
useLldpDiscovery
in interface LinkdConfig
public boolean useOspfDiscovery()
useOspfDiscovery
useOspfDiscovery
in interface LinkdConfig
public boolean useIsIsDiscovery()
useIsIsDiscovery
useIsIsDiscovery
in interface LinkdConfig
public boolean useWifiDiscovery()
useWifiDiscovery
useWifiDiscovery
in interface LinkdConfig
public boolean saveStpNodeTable()
saveStpNodeTable
saveStpNodeTable
in interface LinkdConfig
public boolean saveStpInterfaceTable()
saveStpInterfaceTable
saveStpInterfaceTable
in interface LinkdConfig
public long getInitialSleepTime()
LinkdConfig
getInitialSleepTime
getInitialSleepTime
in interface LinkdConfig
public long getSnmpPollInterval()
LinkdConfig
getSnmpPollInterval
getSnmpPollInterval
in interface LinkdConfig
public long getDiscoveryLinkInterval()
LinkdConfig
getDiscoveryLinkInterval
getDiscoveryLinkInterval
in interface LinkdConfig
public int getThreads()
getThreads
getThreads
in interface LinkdConfig
public boolean hasIpRouteClassName(String sysoid)
hasIpRouteClassName
in interface LinkdConfig
public abstract void update()
update
update
in interface LinkdConfig
protected 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 LinkdConfig
Copyright © 2015. All rights reserved.