public class JMXDriver extends Object implements Driver<JMXNodeLocation>
Driver| Constructor and Description |
|---|
JMXDriver(org.jolokia.client.J4pClient client,
ProtocolDiagnostics diagnostics)
Creates the JMX driver.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
attributeExists(AttributeLocation<JMXNodeLocation> location)
|
Object |
fetchAttribute(AttributeLocation<JMXNodeLocation> location)
Fetches the attribute value specified by the given
attributeLocation from a MonitoredEndpoint and
returns it. |
Map<JMXNodeLocation,ObjectName> |
fetchNodes(JMXNodeLocation query)
Fetches nodes that match the given
query from a MonitoredEndpoint and returns them as an
immutable Map. |
org.jolokia.client.J4pClient |
getClient() |
public JMXDriver(org.jolokia.client.J4pClient client,
ProtocolDiagnostics diagnostics)
client - the client used to connect to the JMX MBeanServerdiagnostics - public Map<JMXNodeLocation,ObjectName> fetchNodes(JMXNodeLocation query) throws ProtocolException
Driverquery from a MonitoredEndpoint and returns them as an
immutable Map. In a given entry in the returned map, the key is the location of the protocol specific
node object that is stored in the value of the entry.fetchNodes in interface Driver<JMXNodeLocation>query - a pattern location to query for native resource nodesMap from locations to native resource nodesProtocolException - on any problems related to the retrievalpublic boolean attributeExists(AttributeLocation<JMXNodeLocation> location) throws ProtocolException
Drivertrue if the given attributeLocation exists on a MonitoredEndpoint or
false otherwise. This method should return true for attributes that exist but are unset.attributeExists in interface Driver<JMXNodeLocation>location - the AttributeLocation to checktrue or falseProtocolException - on any problems related to the retrievalpublic Object fetchAttribute(AttributeLocation<JMXNodeLocation> location) throws ProtocolException
DriverattributeLocation from a MonitoredEndpoint and
returns it. If AttributeLocation.getLocation() is a path pattern containing wildcards, then this method
MAY return a List of objects that contains the attribute values of matching attributes.fetchAttribute in interface Driver<JMXNodeLocation>location - the attribute to retrieveProtocolException - on any problems related to the retrievalpublic org.jolokia.client.J4pClient getClient()
Copyright © 2015 Red Hat, Inc.. All rights reserved.