public class JMXAccessorSetTask extends JMXAccessorTask
Examples: Set a Mbean Manager attribute maxActiveSessions. Set this attribute with fresh jmx connection without save reference
<jmx:set host="127.0.0.1" port="9014" ref="" name="Catalina:type=Manager,context="/ClusterTest",host=localhost" attribute="maxActiveSessions" value="100" type="int" echo="false"> />
First call to a remote MBeanserver save the JMXConnection a referenz jmx.server
These tasks require Ant 1.6 or later interface.JMX_SERVICE_PREFIX, JMX_SERVICE_SUFFIX
alwaysLog, failOnError, redirectErrStream, redirector, redirectorConfigured, redirectorElement, redirectOutput, redirectOutStream
Constructor and Description |
---|
JMXAccessorSetTask() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute() |
protected java.lang.String |
getMBeanAttributeType(javax.management.MBeanServerConnection jmxServerConnection,
java.lang.String name,
java.lang.String attribute)
Get MBean Attribute from Mbean Server
|
java.lang.String |
getType() |
java.lang.String |
getValue() |
boolean |
isConvert() |
java.lang.String |
jmxExecute(javax.management.MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
|
protected java.lang.String |
jmxSet(javax.management.MBeanServerConnection jmxServerConnection,
java.lang.String name) |
void |
setAttribute(java.lang.String attribute) |
void |
setConvert(boolean convert) |
void |
setType(java.lang.String valueType) |
void |
setValue(java.lang.String value) |
accessJMXConnection, convertStringToType, createJMXConnection, createProperty, createProperty, echoResult, execute, getDelimiter, getHost, getIf, getJMXConnection, getName, getPassword, getPort, getProperty, getRef, getResultproperty, getUnless, getUrl, getUsername, isEcho, isSeparatearrayresults, isUseRef, setDelimiter, setEcho, setHost, setIf, setName, setPassword, setPort, setProperty, setRef, setResultproperty, setSeparatearrayresults, setUnless, setUrl, setUsername, testIfCondition, testUnlessCondition
addConfiguredRedirector, closeRedirector, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, handleOutput, isFailOnError, openRedirector, setAlwaysLog, setAppend, setCreateEmptyFiles, setError, setErrorProperty, setFailonerror, setLogError, setOutput, setOutputproperty
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public java.lang.String getAttribute()
public void setAttribute(java.lang.String attribute)
attribute
- The attribute to set.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The value to set.public java.lang.String getType()
public void setType(java.lang.String valueType)
valueType
- The type to set.public boolean isConvert()
public void setConvert(boolean convert)
convert
- The convert to set.public java.lang.String jmxExecute(javax.management.MBeanServerConnection jmxServerConnection) throws java.lang.Exception
jmxExecute
in class JMXAccessorTask
java.lang.Exception
- if an error occursprotected java.lang.String jmxSet(javax.management.MBeanServerConnection jmxServerConnection, java.lang.String name) throws java.lang.Exception
jmxServerConnection
- name
- java.lang.Exception
protected java.lang.String getMBeanAttributeType(javax.management.MBeanServerConnection jmxServerConnection, java.lang.String name, java.lang.String attribute) throws java.lang.Exception
jmxServerConnection
- name
- attribute
- java.lang.Exception
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.