org.apache.tools.ant.taskdefs.optional.jmx
Class ConfigureMBeanTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.jmx.AbstractManagementTask
                    |
                    +--org.apache.tools.ant.taskdefs.optional.jmx.AbstractMBeanTask
                          |
                          +--org.apache.tools.ant.taskdefs.optional.jmx.ConfigureMBeanTask
Direct Known Subclasses:
CreateMBeanTask

public class ConfigureMBeanTask
extends AbstractMBeanTask

This is an Ant task that allows the attributes of a JMX mbean's to be changed or retrieved. Refer to the user documentation for more information and examples on how to use this task.

Version:
$Id: ConfigureMBeanTask.java,v 1.4 2003/05/28 22:28:26 bdueck Exp $
Author:
Brian Dueck

Inner Class Summary
static class ConfigureMBeanTask.GetAttribute
          Nested getAttribute task.
static class ConfigureMBeanTask.SetAttribute
          Nested setAttribute task.
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ConfigureMBeanTask()
           
 
Method Summary
 void addGetAttribute(ConfigureMBeanTask.GetAttribute prop)
          Adds a nested getAttribute element.
 void addSetAttribute(ConfigureMBeanTask.SetAttribute prop)
          Adds a nested setAttribute element.
protected  void execute(javax.management.MBeanServer mbserver)
          Process a element.
protected  void executeForGetAttribute(javax.management.MBeanServer mbserver)
          Process each nested GetAttribute element.
protected  void executeForSetAttribute(javax.management.MBeanServer mbserver, java.util.Map attributeInfo)
          Process each nested SetAttribute element.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.jmx.AbstractMBeanTask
execute, findAttributeInfo, getActiveDomain, getAttributes, getAttributes, getFeatureNames, getJMXServer, getName, getObjectName, removeMBeanIfExists, setMBeanRef, setName, toString
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.jmx.AbstractManagementTask
getContext, getFailOnError, getJndiName, getPassword, getProviderUrl, getUser, setContext, setContextRef, setFailOnError, setJndiName, setPassword, setProviderUrl, setServerType, setUser
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigureMBeanTask

public ConfigureMBeanTask()
Method Detail

addSetAttribute

public void addSetAttribute(ConfigureMBeanTask.SetAttribute prop)
Adds a nested setAttribute element.
Parameters:
prop - The nested setAttribute element.

addGetAttribute

public void addGetAttribute(ConfigureMBeanTask.GetAttribute prop)
Adds a nested getAttribute element.
Parameters:
prop - The nested getAttribute element.

execute

protected void execute(javax.management.MBeanServer mbserver)
                throws org.apache.tools.ant.BuildException
Process a element.
Overrides:
execute in class AbstractMBeanTask
Parameters:
mbserver - The MBeanServer that hosts the mbean.
Throws:
org.apache.tools.ant.BuildException - When an error occurs.

executeForSetAttribute

protected void executeForSetAttribute(javax.management.MBeanServer mbserver,
                                      java.util.Map attributeInfo)
Process each nested SetAttribute element.
Parameters:
mbserver - The MBeanServer being targetd.
attributeInfo - Information about the attributes for the mbean.

executeForGetAttribute

protected void executeForGetAttribute(javax.management.MBeanServer mbserver)
Process each nested GetAttribute element.
Parameters:
mbserver - The MBeanServer being targeted.