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 allAssetFieldobjects that are in packages that match the specified sysoid precisely based on thetag or by starting with the content of the tag. protected SnmpAssetAdapterConfigurationgetConfiguration()Return the configuration object.LockgetReadLock()LockgetWriteLock()protected voidreloadXML(long lastModified, InputStream stream)Synchronized so that we update the timestamp of the file and the contents simultaneously.voidupdate()Update
-
-
-
Constructor Detail
-
SnmpAssetAdapterConfigManager
public SnmpAssetAdapterConfigManager()
Constructor for RancidAdapterConfigManager.
-
SnmpAssetAdapterConfigManager
public SnmpAssetAdapterConfigManager(long lastModified, InputStream reader) throws IOExceptionConstructor for RancidAdapterConfigManager.
- Parameters:
reader- aInputStreamobject.verifyServer- a boolean.serverName- aStringobject.- Throws:
IOException- if any.
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
- Specified by:
getReadLockin interfaceSnmpAssetAdapterConfig
-
getWriteLock
public Lock getWriteLock()
- Specified by:
getWriteLockin interfaceSnmpAssetAdapterConfig
-
reloadXML
protected void reloadXML(long lastModified, InputStream stream) throws IOExceptionSynchronized so that we update the timestamp of the file and the contents simultaneously.- Parameters:
reader- aInputStreamobject.- Throws:
IOException- if any.
-
update
public void update() throws IOExceptionUpdate
- Specified by:
updatein interfaceSnmpAssetAdapterConfig- Throws:
IOException- if any.
-
getConfiguration
protected SnmpAssetAdapterConfiguration getConfiguration()
Return the configuration object.- Returns:
- a
SnmpAssetAdapterConfigurationobject.
-
getAssetFieldsForAddress
public AssetField[] getAssetFieldsForAddress(InetAddress address, String sysoid)
Returns allAssetFieldobjects 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:
getAssetFieldsForAddressin interfaceSnmpAssetAdapterConfig
-
-