public class JMXAccessorEqualsCondition
extends org.apache.tools.ant.ProjectComponent
implements org.apache.tools.ant.taskdefs.condition.Condition
<path id="catalina_ant">
<fileset dir="${catalina.home}/server/lib">
<include name="catalina-ant.jar"/>
</fileset>
</path>
<typedef
name="jmxEquals"
classname="org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition"
classpathref="catalina_ant"/>
usage: Wait for start backup node
<target name="wait">
<waitfor maxwait="${maxwait}" maxwaitunit="second" timeoutproperty="server.timeout" >
<and>
<socket server="${server.name}" port="${server.port}"/>
<http url="${url}"/>
<jmxEquals
host="localhost" port="9014" username="controlRole" password="tomcat"
name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
attribute="connected" value="true"
/>
</and>
</waitfor>
<fail if="server.timeout" message="Server ${url} don't answer inside ${maxwait} sec" />
<echo message="Server ${url} alive" />
</target>
| Constructor and Description |
|---|
JMXAccessorEqualsCondition() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
accessJMXValue() |
boolean |
eval() |
String |
getAttribute() |
String |
getHost() |
String |
getInfo()
Return descriptive information about this implementation and the
corresponding version number, in the format
<description>/<version>. |
protected MBeanServerConnection |
getJMXConnection() |
String |
getName() |
String |
getPassword() |
String |
getPort() |
String |
getRef() |
String |
getUrl() |
String |
getUsername() |
String |
getValue() |
void |
setAttribute(String attribute) |
void |
setHost(String host) |
void |
setName(String objectName) |
void |
setPassword(String password) |
void |
setPort(String port) |
void |
setRef(String refId) |
void |
setUrl(String url) |
void |
setUsername(String username) |
void |
setValue(String value) |
public String getInfo()
<description>/<version>.public String getAttribute()
public void setAttribute(String attribute)
attribute - The attribute to set.public String getHost()
public void setHost(String host)
host - The host to set.public String getName()
public void setName(String objectName)
objectName - The name to set.public String getPassword()
public void setPassword(String password)
password - The password to set.public String getPort()
public void setPort(String port)
port - The port to set.public String getUrl()
public void setUrl(String url)
url - The url to set.public String getUsername()
public void setUsername(String username)
username - The username to set.public String getValue()
public void setValue(String value)
public String getRef()
public void setRef(String refId)
refId - The ref to set.protected MBeanServerConnection getJMXConnection() throws MalformedURLException, IOException
MalformedURLExceptionIOExceptionprotected String accessJMXValue()
public boolean eval()
eval in interface org.apache.tools.ant.taskdefs.condition.ConditionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.