FileDocCategorySizeDatePackage
JMXSetTask.javaAPI DocApache Tomcat 6.0.143193Fri Jul 20 04:20:36 BST 2007org.apache.catalina.ant

JMXSetTask

public class JMXSetTask extends AbstractCatalinaTask
Ant task that implements the JMX Set command (/jmxproxy/?set) supported by the Tomcat manager application.
author
Vivek Chopra
version
$Revision: 467222 $

Fields Summary
protected String
bean
The full bean name
protected String
attribute
The attribute you wish to alter
protected String
value
The new value for the attribute
Constructors Summary
Methods Summary
public voidexecute()
Execute the requested operation.

exception
BuildException if an error occurs

        super.execute();
        if (bean == null || attribute == null || value == null) {
            throw new BuildException
                ("Must specify 'bean', 'attribute' and 'value' attributes");
        }
        log("Setting attribute " + attribute +
                            " in bean " + bean +
                            " to " + value); 
        execute("/jmxproxy/?set=" + bean 
                + "&att=" + attribute 
                + "&val=" + value);
    
public java.lang.StringgetAttribute()
Get method for the attribute name

return
Attribute name

        return this.attribute;
    
public java.lang.StringgetBean()
Get method for the bean name

return
Bean name


    // Public Methods
    
                  
        
        return this.bean;
    
public java.lang.StringgetValue()
Get method for the attribute value

return
Attribute value

        return this.value;
    
public voidsetAttribute(java.lang.String attribute)
Set method for the attribute name

param
attribute Attribute name

        this.attribute = attribute;
    
public voidsetBean(java.lang.String bean)
Set method for the bean name

param
bean Bean name

        this.bean = bean;
    
public voidsetValue(java.lang.String value)
Set method for the attribute value.

param
value Attribute value

        this.value = value;