9.8. Methods Available to Proxy Resources

The ProxyFactory classes provide shortcuts for a lot of common resource management tasks, such as viewing monitoring data, running operations, or changing the resource or plug-in configuration. These methods are not in the regular API, but they can be used both by the JBoss ON CLI and by JBoss ON server-side scripts.
The shortcuts and methods available through ProxyFactory are different, depending on the resource type. Methods are only available if the resource type supports that functional area.
This section lists the three most common resource types:
TIP
Use tab-complete in the interactive CLI to find the specific methods available for a resource type or to get the method signatures for individual methods.
Using proxy resources is covered in Section 10.2, “Using Resource Proxies”.

Table 9.1. Proxy Methods for Platforms

Information Methods
measurements Displays a pretty-print list of the available metrics, current values, and description of all measurements for the platform resource.
operations Lists the available operations for the resource type.
Shortcut Metric Methods
OSName OSVersion architecture createdDate
description distributionName distributionVersion freeMemory
freeSwapSpace hostname idle totalMemory
systemLoad totalSwapSpace usedSwapSpace usedMemory
userLoad modifiedDate waitLoad version
Shortcut Resource Entry Methods
id (inventory ID number) resourceType name (inventory name)
Shortcut Operation Methods
manualAutodiscovery cleanYumMetadataCache viewProcessList
Shortcut Configuration Methods
editPluginConfiguration() pluginConfiguration
pluginConfigurationDefinition
Shortcut Content Methods
contentTypes
Shortcut Inventory Methods
children
Method Signature
platform.getChild
ResourceClientProxy getChild(String)
platform.getMeasurement
Measurement getMeasurement(String)
platform.updatePluginConfiguration
PluginConfigurationUpdate updatePluginConfiguration(Configuration)
platform.toString
String toString()

Table 9.2. Proxy Methods for JBoss AS/EAP Servers

Information Methods
measurements Displays a pretty-print list of the available metrics, current values, and description of all measurements for the JBoss resource.
operations Lists the available operations for the resource type.
Shortcut Metric Methods
JVMFreeMemory JVMMaxMemory JVMTotalMemory activeThreadCount
activeThreadGroupCount buildDate createdDate description
modifiedDate startDate totalTransactions totalTransactionsperMinute
transactionsCommitted transactionsCommittedperMinute transactionsRolledback transactionsRolledbackperMinute
partitionName versionName version
Shortcut Resource Entry Methods
id (inventory ID number) resourceType name (inventory name)
Shortcut Operation Methods
restart shutdown start
Shortcut Configuration Methods
editPluginConfiguration() pluginConfiguration
pluginConfigurationDefinition
Shortcut Content Methods
contentTypes
Shortcut Inventory Methods
children
Method Signature
jbossas.getChild
ResourceClientProxy getChild(String)
jbossas.getMeasurement
Measurement getMeasurement(String)
jbossas.updatePluginConfiguration
PluginConfigurationUpdate updatePluginConfiguration(Configuration)
jbossas.toString
String toString()

Table 9.3. Proxy Methods for Content Sources (EARs, WARs, JARs)

Information Methods
measurements Displays a pretty-print list of the available metrics, current values, and description of all measurements for the content resource.
operations Lists the available operations for the resource type.
Shortcut Metric Methods
createdDate modifiedDate description
path version exploded
Shortcut Resource Entry Methods
id (inventory ID number) resourceType name (inventory name)
Shortcut Operation Methods
revert
Shortcut Configuration Methods
editPluginConfiguration() pluginConfiguration
pluginConfigurationDefinition
Shortcut Content Methods
contentTypes backingContent
Shortcut Inventory Methods
children
Method Signature
content.getChild
ResourceClientProxy getChild(String)
content.getMeasurement
Measurement getMeasurement(String)
content.updatePluginConfiguration
PluginConfigurationUpdate updatePluginConfiguration(Configuration)
content.toString
String toString()
content.retrieveBackingContent
retrieveBackingContent(String fileName)
content.updateBackingContent
updateBackingContent(String filename, String displayVersion)