Package org.opennms.netmgt.config
Class SnmpAssetAdapterConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.SnmpAssetAdapterConfigManager
-
- All Implemented Interfaces:
SnmpAssetAdapterConfig
public class SnmpAssetAdapterConfigManager extends Object implements SnmpAssetAdapterConfig
Abstract RancidAdapterConfigManager class.
- Version:
- $Id: $
- Author:
- Antonio Russo, Mathew Brozowski, David Hustace
-
-
Constructor Summary
Constructors Constructor Description SnmpAssetAdapterConfigManager()
Constructor for RancidAdapterConfigManager.SnmpAssetAdapterConfigManager(long lastModified, InputStream reader)
Constructor for RancidAdapterConfigManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetField[]
getAssetFieldsForAddress(InetAddress address, String sysoid)
Returns allAssetField
objects that are in packages that match the specified sysoid precisely based on thetag or by starting with the content of the tag. protected SnmpAssetAdapterConfiguration
getConfiguration()
Return the configuration object.Lock
getReadLock()
Lock
getWriteLock()
protected void
reloadXML(long lastModified, InputStream stream)
Synchronized so that we update the timestamp of the file and the contents simultaneously.void
update()
Update
-
-
-
Constructor Detail
-
SnmpAssetAdapterConfigManager
public SnmpAssetAdapterConfigManager()
Constructor for RancidAdapterConfigManager.
-
SnmpAssetAdapterConfigManager
public SnmpAssetAdapterConfigManager(long lastModified, InputStream reader) throws IOException
Constructor for RancidAdapterConfigManager.
- Parameters:
reader
- aInputStream
object.verifyServer
- a boolean.serverName
- aString
object.- Throws:
IOException
- if any.
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
- Specified by:
getReadLock
in interfaceSnmpAssetAdapterConfig
-
getWriteLock
public Lock getWriteLock()
- Specified by:
getWriteLock
in interfaceSnmpAssetAdapterConfig
-
reloadXML
protected void reloadXML(long lastModified, InputStream stream) throws IOException
Synchronized so that we update the timestamp of the file and the contents simultaneously.- Parameters:
reader
- aInputStream
object.- Throws:
IOException
- if any.
-
update
public void update() throws IOException
Update
- Specified by:
update
in interfaceSnmpAssetAdapterConfig
- Throws:
IOException
- if any.
-
getConfiguration
protected SnmpAssetAdapterConfiguration getConfiguration()
Return the configuration object.- Returns:
- a
SnmpAssetAdapterConfiguration
object.
-
getAssetFieldsForAddress
public AssetField[] getAssetFieldsForAddress(InetAddress address, String sysoid)
Returns allAssetField
objects that are in packages that match the specified sysoid precisely based on thetag or by starting with the content of the tag. TODO: Support matching based on IP address - Specified by:
getAssetFieldsForAddress
in interfaceSnmpAssetAdapterConfig
-
-