org.apache.catalina.ant.jmx

Class JMXAccessorQueryTask

public class JMXAccessorQueryTask extends JMXAccessorTask

Query for Mbeans.
Query a list of Mbeans.
   <jmxQuery
           host="127.0.0.1"
           port="9014"
           name="Catalina:type=Manager,* 
           resultproperty="manager" />
 
with attribute attributebinding="true" you can get all attributes also from result objects.
The poperty manager.lenght show the size of the result and with manager.[0..lenght].name the resulted ObjectNames are saved. These tasks require Ant 1.6 or later interface.

Since: 5.5.10

Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Peter Rossbach

Method Summary
protected voidbindAttributes(MBeanServerConnection jmxServerConnection, String resultproperty, String pname, ObjectName oname)
StringgetInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.
booleanisAttributebinding()
StringjmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
protected StringjmxQuery(MBeanServerConnection jmxServerConnection, String qry)
Call Mbean server for some mbeans with same domain, attributes. with attributebindung=true you can save all attributes from all found objects as your ant properties
voidsetAttributebinding(boolean attributeBinding)

Method Detail

bindAttributes

protected void bindAttributes(MBeanServerConnection jmxServerConnection, String resultproperty, String pname, ObjectName oname)

Parameters: jmxServerConnection resultproperty pname oname

getInfo

public String getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.

isAttributebinding

public boolean isAttributebinding()

Returns: Returns the attributebinding.

jmxExecute

public String jmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties. The input stream will be closed upon completion of this task, whether it was executed successfully or not.

Throws: Exception if an error occurs

jmxQuery

protected String jmxQuery(MBeanServerConnection jmxServerConnection, String qry)
Call Mbean server for some mbeans with same domain, attributes. with attributebindung=true you can save all attributes from all found objects as your ant properties

Parameters: jmxServerConnection qry

Returns: The query result

setAttributebinding

public void setAttributebinding(boolean attributeBinding)

Parameters: attributeBinding The attributebinding to set.

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.