Package org.opennms.netmgt.config
Class WsManAssetAdapterConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.WsManAssetAdapterConfigManager
-
- All Implemented Interfaces:
WsManAssetAdapterConfig
public class WsManAssetAdapterConfigManager extends Object implements WsManAssetAdapterConfig
-
-
Constructor Summary
Constructors Constructor Description WsManAssetAdapterConfigManager()WsManAssetAdapterConfigManager(long lastModified, InputStream reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetField[]getAssetFieldsForAddress(InetAddress address, String vendor)Returns allAssetFieldobjects that are in packages that match the specified Vendor precisely.protected WsManAssetAdapterConfigurationgetConfiguration()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
-
WsManAssetAdapterConfigManager
public WsManAssetAdapterConfigManager()
-
WsManAssetAdapterConfigManager
public WsManAssetAdapterConfigManager(long lastModified, InputStream reader) throws IOException- Throws:
IOException
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
- Specified by:
getReadLockin interfaceWsManAssetAdapterConfig
-
getWriteLock
public Lock getWriteLock()
- Specified by:
getWriteLockin interfaceWsManAssetAdapterConfig
-
reloadXML
protected void reloadXML(long lastModified, InputStream stream) throws IOExceptionSynchronized so that we update the timestamp of the file and the contents simultaneously.- Throws:
IOException
-
update
public void update() throws IOExceptionUpdate
- Specified by:
updatein interfaceWsManAssetAdapterConfig- Throws:
IOException- if any.
-
getConfiguration
protected WsManAssetAdapterConfiguration getConfiguration()
Return the configuration object.- Returns:
- a
org.opennms.netmgt.config.snmpAsset.adapter.WsManAssetAdapterConfigurationobject.
-
getAssetFieldsForAddress
public AssetField[] getAssetFieldsForAddress(InetAddress address, String vendor)
Returns allAssetFieldobjects that are in packages that match the specified Vendor precisely. This relies on the WsManDetector issuing an Identify and populating the Vendor and Product fields.- Specified by:
getAssetFieldsForAddressin interfaceWsManAssetAdapterConfig
-
-