Package org.opennms.netmgt.collectd.wmi
Class WmiAgentState
- java.lang.Object
-
- org.opennms.netmgt.collectd.wmi.WmiAgentState
-
public class WmiAgentState extends 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(InetAddress address, WmiAgentConfig agentConfig, Map<?,?> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(String namespace)
connectvoid
didCheckGroupAvailability(String groupName)
didCheckGroupAvailabilityString
getAddress()
getAddressWmiManager
getManager()
getManagerIWmiClient
getWmiClient()
getWmiClientboolean
groupIsAvailable(String groupName)
groupIsAvailablevoid
setGroupIsAvailable(String groupName, boolean available)
setGroupIsAvailablevoid
setWmiClient(IWmiClient wmiClient)
setWmiClientboolean
shouldCheckAvailability(String groupName, int recheckInterval)
shouldCheckAvailability
-
-
-
Constructor Detail
-
WmiAgentState
public WmiAgentState(InetAddress address, WmiAgentConfig agentConfig, Map<?,?> parameters)
-
-
Method Detail
-
connect
public void connect(String namespace)
connect
- Parameters:
namespace
- the WMI namespace to request
-
getManager
public WmiManager getManager()
getManager
- Returns:
- a
WmiManager
object.
-
groupIsAvailable
public boolean groupIsAvailable(String groupName)
groupIsAvailable
- Parameters:
groupName
- aString
object.- Returns:
- a boolean.
-
setGroupIsAvailable
public void setGroupIsAvailable(String groupName, boolean available)
setGroupIsAvailable
- Parameters:
groupName
- aString
object.available
- a boolean.
-
shouldCheckAvailability
public boolean shouldCheckAvailability(String groupName, int recheckInterval)
shouldCheckAvailability
- Parameters:
groupName
- aString
object.recheckInterval
- a int.- Returns:
- a boolean.
-
didCheckGroupAvailability
public void didCheckGroupAvailability(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.
-
-