public class JMXAccessorSetTask extends JMXAccessorTask
Examples: Set an 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 |
---|---|
String |
getAttribute() |
String |
getInfo()
Return descriptive information about this implementation and the
corresponding version number, in the format
<description>/<version> . |
protected String |
getMBeanAttributeType(MBeanServerConnection jmxServerConnection,
String name,
String attribute)
Get MBean Attribute from Mbean Server
|
String |
getType() |
String |
getValue() |
boolean |
isConvert() |
String |
jmxExecute(MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
|
protected String |
jmxSet(MBeanServerConnection jmxServerConnection,
String name)
Set property value.
|
void |
setAttribute(String attribute) |
void |
setConvert(boolean convert) |
void |
setType(String valueType) |
void |
setValue(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 String getInfo()
<description>/<version>
.getInfo
in class JMXAccessorTask
public String getAttribute()
public void setAttribute(String attribute)
attribute
- The attribute to set.public String getValue()
public void setValue(String value)
value
- The value to set.public String getType()
public void setType(String valueType)
valueType
- The type to set.public boolean isConvert()
public void setConvert(boolean convert)
convert
- The convert to set.public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception
JMXAccessorTask
jmxExecute
in class JMXAccessorTask
jmxServerConnection
- The JMX connection that should be usedException
- if an error occursprotected String jmxSet(MBeanServerConnection jmxServerConnection, String name) throws Exception
jmxServerConnection
- Connection to the JMX servername
- The MBean nameException
- An error occurredprotected String getMBeanAttributeType(MBeanServerConnection jmxServerConnection, String name, String attribute) throws Exception
jmxServerConnection
- The JMX connection namename
- The MBean nameattribute
- The attribute nameException
- An error occurredCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.