public class JMXAccessorCreateTask extends JMXAccessorTask
Examples:
create a new Mbean at jmx.server connection
<jmx:create ref="jmx.server" name="Catalina:type=MBeanFactory" className="org.apache.catalina.mbeans.MBeanFactory" classLoader="Catalina:type=ServerClassLoader,name=server"> <Arg value="org.apache.catalina.mbeans.MBeanFactory" /> </jmxCreate/>
WARNINGNot all Tomcat MBeans can create remotely and autoregister by its parents! Please, use the MBeanFactory operation to generate valves and realms.
First call to a remote MBeanserver save the JMXConnection a reference 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 |
---|
JMXAccessorCreateTask() |
Modifier and Type | Method and Description |
---|---|
void |
addArg(Arg arg) |
java.util.List<Arg> |
getArgs() |
java.lang.String |
getClassLoader() |
java.lang.String |
getClassName() |
java.lang.String |
getInfo()
Return descriptive information about this implementation and the
corresponding version number, in the format
<description>/<version> . |
protected java.lang.String |
jmxCreate(javax.management.MBeanServerConnection jmxServerConnection,
java.lang.String name)
create new Mbean and when set from ClassLoader Objectname
|
java.lang.String |
jmxExecute(javax.management.MBeanServerConnection jmxServerConnection)
Execute the specified command, based on the configured properties.
|
void |
setArgs(java.util.List<Arg> args) |
void |
setClassLoader(java.lang.String classLoaderName) |
void |
setClassName(java.lang.String className) |
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 getInfo()
<description>/<version>
.getInfo
in class JMXAccessorTask
public java.lang.String getClassLoader()
public void setClassLoader(java.lang.String classLoaderName)
classLoaderName
- The classLoader to set.public java.lang.String getClassName()
public void setClassName(java.lang.String className)
className
- The className to set.public void addArg(Arg arg)
public java.util.List<Arg> getArgs()
public void setArgs(java.util.List<Arg> args)
args
- The args 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 jmxCreate(javax.management.MBeanServerConnection jmxServerConnection, java.lang.String name) throws java.lang.Exception
jmxServerConnection
- name
- java.lang.Exception
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.