Package org.opennms.netmgt.config
Class WsManAssetAdapterConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.WsManAssetAdapterConfigManager
-
- All Implemented Interfaces:
WsManAssetAdapterConfig
public class WsManAssetAdapterConfigManager extends java.lang.Object implements WsManAssetAdapterConfig
-
-
Constructor Summary
Constructors Constructor Description WsManAssetAdapterConfigManager()
WsManAssetAdapterConfigManager(long lastModified, java.io.InputStream reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetField[]
getAssetFieldsForAddress(java.net.InetAddress address, java.lang.String vendor)
Returns allAssetField
objects that are in packages that match the specified Vendor precisely.protected WsManAssetAdapterConfiguration
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
-
-
-
Method Detail
-
getReadLock
public java.util.concurrent.locks.Lock getReadLock()
- Specified by:
getReadLock
in interfaceWsManAssetAdapterConfig
-
getWriteLock
public java.util.concurrent.locks.Lock getWriteLock()
- Specified by:
getWriteLock
in interfaceWsManAssetAdapterConfig
-
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.- Throws:
java.io.IOException
-
update
public void update() throws java.io.IOException
Update
- Specified by:
update
in interfaceWsManAssetAdapterConfig
- Throws:
java.io.IOException
- if any.
-
getConfiguration
protected WsManAssetAdapterConfiguration getConfiguration()
Return the configuration object.- Returns:
- a
org.opennms.netmgt.config.snmpAsset.adapter.WsManAssetAdapterConfiguration
object.
-
getAssetFieldsForAddress
public AssetField[] getAssetFieldsForAddress(java.net.InetAddress address, java.lang.String vendor)
Returns allAssetField
objects 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:
getAssetFieldsForAddress
in interfaceWsManAssetAdapterConfig
-
-