Class JMXAccessorTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.catalina.ant.BaseRedirectorHelperTask
org.apache.catalina.ant.jmx.JMXAccessorTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
JMXAccessorCreateTask, JMXAccessorGetTask, JMXAccessorInvokeTask, JMXAccessorQueryTask, JMXAccessorSetTask, JMXAccessorUnregisterTask

public class JMXAccessorTask extends BaseRedirectorHelperTask
Access JMX JSR 160 MBeans Server.
  • open more then one JSR 160 rmi connection
  • Get/Set Mbeans attributes
  • Call Mbean Operation with arguments
  • Argument values can be converted from string to int,long,float,double,boolean,ObjectName or InetAddress
  • Query Mbeans
  • Show Get, Call, Query result at Ant console log
  • Bind Get, Call, Query result at Ant properties
Examples: open server with reference and authorisation

    <jmxOpen
            host="127.0.0.1"
            port="9014"
            username="monitorRole"
            password="mysecret"
            ref="jmx.myserver"
        />
 
All calls after opening with same refid reuse the connection.

First call to a remote MBeanserver save the JMXConnection a referenz jmx.server

All JMXAccessorXXXTask support the attribute if and unless. With if the task is only execute when property exist and with unless when property not exists.
NOTE : These tasks require Ant 1.6 or later interface.
Since:
5.5.10
Author:
Peter Rossbach