public class DMRDriver extends Object implements Driver<DMRNodeLocation>
Driver| Constructor and Description |
|---|
DMRDriver(org.jboss.as.controller.client.ModelControllerClient client,
MonitoredEndpoint<MonitorServiceConfiguration.EndpointConfiguration> endpoint,
ProtocolDiagnostics diagnostics) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
attributeExists(AttributeLocation<DMRNodeLocation> location)
|
Object |
fetchAttribute(AttributeLocation<DMRNodeLocation> location)
Fetches the attribute value specified by the given
attributeLocation from a MonitoredEndpoint and
returns it. |
Map<DMRNodeLocation,Object> |
fetchAttributeAsMap(AttributeLocation<DMRNodeLocation> location)
Fetches the attribute value specified by the given
attributeLocation from a MonitoredEndpoint and
returns it as the values in the given map. |
Map<DMRNodeLocation,org.jboss.dmr.ModelNode> |
fetchNodes(DMRNodeLocation query)
Fetches nodes that match the given
query from a MonitoredEndpoint and returns them as an
immutable Map. |
org.jboss.as.controller.client.ModelControllerClient |
getClient() |
protected Object |
postProcessAttribute(String attribute,
Object oldValue) |
public DMRDriver(org.jboss.as.controller.client.ModelControllerClient client,
MonitoredEndpoint<MonitorServiceConfiguration.EndpointConfiguration> endpoint,
ProtocolDiagnostics diagnostics)
public boolean attributeExists(AttributeLocation<DMRNodeLocation> location)
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<DMRNodeLocation>location - the AttributeLocation to checktrue or falsepublic Object fetchAttribute(AttributeLocation<DMRNodeLocation> 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<DMRNodeLocation>location - the attribute to retrieveProtocolException - on any problems related to the retrievalpublic Map<DMRNodeLocation,Object> fetchAttributeAsMap(AttributeLocation<DMRNodeLocation> location) throws ProtocolException
DriverattributeLocation from a MonitoredEndpoint and
returns it as the values in the given map.
Assumes the AttributeLocation.getLocation() is a multi-target path (e.g. it contains wildcards)
and returns a map of all attribute values keyed on the resource location. If attributeLocation is not
multi-targeted the map will just contain a single entry.
Use this method (as opposed to Driver.fetchAttribute(AttributeLocation)) if you need to know which
resource locations returned which attribute values. The values returned are the same in both methods, this
just allows you to correlate which location returned which value.fetchAttributeAsMap in interface Driver<DMRNodeLocation>location - the attribute to retrieveProtocolException - on any problems related to the retrievalpublic Map<DMRNodeLocation,org.jboss.dmr.ModelNode> fetchNodes(DMRNodeLocation 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<DMRNodeLocation>query - a pattern location to query for native resource nodesMap from locations to native resource nodesProtocolException - on any problems related to the retrievalpublic org.jboss.as.controller.client.ModelControllerClient getClient()
Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.