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 allAssetField
objects that are in packages that match the specified Vendor precisely.protected WsManAssetAdapterConfiguration
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
-
WsManAssetAdapterConfigManager
public WsManAssetAdapterConfigManager()
-
WsManAssetAdapterConfigManager
public WsManAssetAdapterConfigManager(long lastModified, InputStream reader) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
- Specified by:
getReadLock
in interfaceWsManAssetAdapterConfig
-
getWriteLock
public Lock getWriteLock()
- Specified by:
getWriteLock
in interfaceWsManAssetAdapterConfig
-
reloadXML
protected void reloadXML(long lastModified, InputStream stream) throws IOException
Synchronized so that we update the timestamp of the file and the contents simultaneously.- Throws:
IOException
-
update
public void update() throws IOException
Update
- Specified by:
update
in interfaceWsManAssetAdapterConfig
- Throws:
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(InetAddress address, 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
-
-