Package org.opennms.netmgt.collectd.wmi
Class WmiAgentState
- java.lang.Object
-
- org.opennms.netmgt.collectd.wmi.WmiAgentState
-
public class WmiAgentState extends java.lang.Object
Contains a WmiManager and WmiClient instance referring to the agent loaded via the InetAddress parameter provided in the constructor. Uses the InetAddress to look up the agent configuration to properly connect the client and manager to the remote agent. Provides the collector with access to the client and manager as well as information regarding the availability of WPM (Windows Performance Metric) groups.
- Author:
- Matt Raykowski, OpenNMS
-
-
Constructor Summary
Constructors Constructor Description WmiAgentState(java.net.InetAddress address, WmiAgentConfig agentConfig, java.util.Map<?,?> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(java.lang.String namespace)
connectvoid
didCheckGroupAvailability(java.lang.String groupName)
didCheckGroupAvailabilityjava.lang.String
getAddress()
getAddressWmiManager
getManager()
getManagerIWmiClient
getWmiClient()
getWmiClientboolean
groupIsAvailable(java.lang.String groupName)
groupIsAvailablevoid
setGroupIsAvailable(java.lang.String groupName, boolean available)
setGroupIsAvailablevoid
setWmiClient(IWmiClient wmiClient)
setWmiClientboolean
shouldCheckAvailability(java.lang.String groupName, int recheckInterval)
shouldCheckAvailability
-
-
-
Constructor Detail
-
WmiAgentState
public WmiAgentState(java.net.InetAddress address, WmiAgentConfig agentConfig, java.util.Map<?,?> parameters)
-
-
Method Detail
-
connect
public void connect(java.lang.String namespace)
connect
- Parameters:
namespace
- the WMI namespace to request
-
getAddress
public java.lang.String getAddress()
getAddress
- Returns:
- a
String
object.
-
getManager
public WmiManager getManager()
getManager
- Returns:
- a
WmiManager
object.
-
groupIsAvailable
public boolean groupIsAvailable(java.lang.String groupName)
groupIsAvailable
- Parameters:
groupName
- aString
object.- Returns:
- a boolean.
-
setGroupIsAvailable
public void setGroupIsAvailable(java.lang.String groupName, boolean available)
setGroupIsAvailable
- Parameters:
groupName
- aString
object.available
- a boolean.
-
shouldCheckAvailability
public boolean shouldCheckAvailability(java.lang.String groupName, int recheckInterval)
shouldCheckAvailability
- Parameters:
groupName
- aString
object.recheckInterval
- a int.- Returns:
- a boolean.
-
didCheckGroupAvailability
public void didCheckGroupAvailability(java.lang.String groupName)
didCheckGroupAvailability
- Parameters:
groupName
- aString
object.
-
getWmiClient
public IWmiClient getWmiClient()
getWmiClient
- Returns:
- a
IWmiClient
object.
-
setWmiClient
public void setWmiClient(IWmiClient wmiClient)
setWmiClient
- Parameters:
wmiClient
- aIWmiClient
object.
-
-