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

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
                                |
                                +--org.apache.tools.ant.taskdefs.optional.jmx.CreateMBeanTask

public class CreateMBeanTask
extends ConfigureMBeanTask

This is an Ant task that allows a JMX mbean to be created and the attributes of the new 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: CreateMBeanTask.java,v 1.3 2003/05/26 10:13:05 bdueck Exp $
Author:
Brian Dueck

Inner classes inherited from class org.apache.tools.ant.taskdefs.optional.jmx.ConfigureMBeanTask
ConfigureMBeanTask.GetAttribute, ConfigureMBeanTask.SetAttribute
 
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
CreateMBeanTask()
           
 
Method Summary
protected  void execute(javax.management.MBeanServer mbserver)
          Process all nested elements
 void setIfExists(IfExists ifExists)
          Sets the IfExists attribute.
 void setType(java.lang.String type)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.jmx.ConfigureMBeanTask
addGetAttribute, addSetAttribute, executeForGetAttribute, executeForSetAttribute
 
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

CreateMBeanTask

public CreateMBeanTask()
Method Detail

setType

public void setType(java.lang.String type)

setIfExists

public void setIfExists(IfExists ifExists)
Sets the IfExists attribute. This attribute controls the behaviour of this task when an mbean with the same name as the target mbean already exists.
Parameters:
ifExists - The value for the ifExists attribute.

execute

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