org.opennms.netmgt.config
Class MapsAdapterConfigManager

java.lang.Object
  extended by org.opennms.netmgt.config.MapsAdapterConfigManager
All Implemented Interfaces:
MapsAdapterConfig
Direct Known Subclasses:
MapsAdapterConfigFactory

public abstract class MapsAdapterConfigManager
extends Object
implements MapsAdapterConfig

Author:
Antonio Russo, Mathew Brozowski, David Hustace

Constructor Summary
MapsAdapterConfigManager()
           
MapsAdapterConfigManager(Reader reader, String serverName, boolean verifyServer)
           
 
Method Summary
 List<Cmap> getAllMaps()
           
 List<String> getAllPackageMatches(String ipaddr)
          Returns a list of package names that the ip belongs to, null if none.
 Map<String,List<Celement>> getCelements()
           
 MapsAdapterConfiguration getConfiguration()
          Return the poller configuration object.
 Map<String,Csubmap> getContainerMaps(String submapName)
           
 Map<String,Celement> getElementByAddress(String ipaddr)
           
 int getMapElementDimension()
           
 Map<String,List<Csubmap>> getsubMaps()
           
 List<Csubmap> getSubMaps(String mapName)
           
 Iterable<String> includeURLs(Package pkg)
           
 Iterable<Package> packages()
           
 void rebuildPackageIpListMap()
          This method is used to rebuild the package agaist iplist mapping when needed.
protected  void reloadXML(Reader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opennms.netmgt.config.MapsAdapterConfig
update
 

Constructor Detail

MapsAdapterConfigManager

public MapsAdapterConfigManager(Reader reader,
                                String serverName,
                                boolean verifyServer)
                         throws org.exolab.castor.xml.MarshalException,
                                org.exolab.castor.xml.ValidationException,
                                IOException
Parameters:
reader -
localServer -
verifyServer -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException

MapsAdapterConfigManager

public MapsAdapterConfigManager()
Method Detail

reloadXML

protected void reloadXML(Reader reader)
                  throws org.exolab.castor.xml.MarshalException,
                         org.exolab.castor.xml.ValidationException,
                         IOException
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException

getAllPackageMatches

public List<String> getAllPackageMatches(String ipaddr)
Returns a list of package names that the ip belongs to, null if none. Note: Evaluation of the interface against a package filter will only work if the IP is alrady in the database.

Parameters:
ipaddr - the interface to check
Returns:
a list of package names that the ip belongs to, null if none

packages

public Iterable<Package> packages()

includeURLs

public Iterable<String> includeURLs(Package pkg)

getConfiguration

public MapsAdapterConfiguration getConfiguration()
Return the poller configuration object.


getAllMaps

public List<Cmap> getAllMaps()
Specified by:
getAllMaps in interface MapsAdapterConfig

getElementByAddress

public Map<String,Celement> getElementByAddress(String ipaddr)
Specified by:
getElementByAddress in interface MapsAdapterConfig

getSubMaps

public List<Csubmap> getSubMaps(String mapName)
Specified by:
getSubMaps in interface MapsAdapterConfig

getMapElementDimension

public int getMapElementDimension()
Specified by:
getMapElementDimension in interface MapsAdapterConfig

getContainerMaps

public Map<String,Csubmap> getContainerMaps(String submapName)
Specified by:
getContainerMaps in interface MapsAdapterConfig

getsubMaps

public Map<String,List<Csubmap>> getsubMaps()
Specified by:
getsubMaps in interface MapsAdapterConfig

getCelements

public Map<String,List<Celement>> getCelements()
Specified by:
getCelements in interface MapsAdapterConfig

rebuildPackageIpListMap

public void rebuildPackageIpListMap()
This method is used to rebuild the package agaist iplist mapping when needed. When a node gained service event occurs, poller has to determine which package the ip/service combination is in, but if the interface is a newly added one, the package iplist should be rebuilt so that poller could know which package this ip/service pair is in.

Specified by:
rebuildPackageIpListMap in interface MapsAdapterConfig


Copyright © 2009. All Rights Reserved.