Package org.opennms.netmgt.config
Class SnmpAssetAdapterConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.SnmpAssetAdapterConfigManager
-
- All Implemented Interfaces:
SnmpAssetAdapterConfig
public class SnmpAssetAdapterConfigManager extends java.lang.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, java.io.InputStream reader)
Constructor for RancidAdapterConfigManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetField[]
getAssetFieldsForAddress(java.net.InetAddress address, java.lang.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.java.util.concurrent.locks.Lock
getReadLock()
java.util.concurrent.locks.Lock
getWriteLock()
protected void
reloadXML(long lastModified, java.io.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, java.io.InputStream reader) throws java.io.IOException
Constructor for RancidAdapterConfigManager.
- Parameters:
reader
- aInputStream
object.verifyServer
- a boolean.serverName
- aString
object.- Throws:
java.io.IOException
- if any.
-
-
Method Detail
-
getReadLock
public java.util.concurrent.locks.Lock getReadLock()
- Specified by:
getReadLock
in interfaceSnmpAssetAdapterConfig
-
getWriteLock
public java.util.concurrent.locks.Lock getWriteLock()
- Specified by:
getWriteLock
in interfaceSnmpAssetAdapterConfig
-
reloadXML
protected void reloadXML(long lastModified, java.io.InputStream stream) throws java.io.IOException
Synchronized so that we update the timestamp of the file and the contents simultaneously.- Parameters:
reader
- aInputStream
object.- Throws:
java.io.IOException
- if any.
-
update
public void update() throws java.io.IOException
Update
- Specified by:
update
in interfaceSnmpAssetAdapterConfig
- Throws:
java.io.IOException
- if any.
-
getConfiguration
protected SnmpAssetAdapterConfiguration getConfiguration()
Return the configuration object.- Returns:
- a
SnmpAssetAdapterConfiguration
object.
-
getAssetFieldsForAddress
public AssetField[] getAssetFieldsForAddress(java.net.InetAddress address, java.lang.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
-
-