Class JMXAccessorConditionBase
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.catalina.ant.jmx.JMXAccessorConditionBase
- All Implemented Interfaces:
Cloneable, org.apache.tools.ant.taskdefs.condition.Condition
- Direct Known Subclasses:
JMXAccessorCondition, JMXAccessorEqualsCondition
public abstract class JMXAccessorConditionBase
extends org.apache.tools.ant.ProjectComponent
implements org.apache.tools.ant.taskdefs.condition.Condition
Base class for JMX accessor conditions.
-
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGet value from MBeans attribute.Get the attribute name.getHost()Get the JMX host.protected MBeanServerConnectionGet JMXConnection (default look at jmx.server project reference from jmxOpen Task).getName()Get the MBean object name.Get the JMX password.getPort()Get the JMX port.getRef()Get the project reference for the JMX connection.getUrl()Get the JMX URL.Get the JMX username.getValue()Get the expected attribute value.voidsetAttribute(String attribute) Set the attribute name.voidSet the JMX host.voidSet the MBean object name.voidsetPassword(String password) Set the JMX password.voidSet the JMX port.voidSet the project reference for the JMX connection.voidSet the JMX URL.voidsetUsername(String username) Set the JMX username.voidSet the expected attribute value.Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tools.ant.taskdefs.condition.Condition
eval
-
Constructor Details
-
JMXAccessorConditionBase
public JMXAccessorConditionBase()Constructs a new JMXAccessorConditionBase.
-
-
Method Details
-
getAttribute
-
setAttribute
Set the attribute name.- Parameters:
attribute- the attribute name to set
-
getHost
-
setHost
-
getName
-
setName
Set the MBean object name.- Parameters:
objectName- the name to set
-
getPassword
-
setPassword
Set the JMX password.- Parameters:
password- the password to set
-
getPort
-
setPort
-
getUrl
-
setUrl
-
getUsername
-
setUsername
Set the JMX username.- Parameters:
username- the username to set
-
getValue
-
setValue
Set the expected attribute value.- Parameters:
value- the value to set
-
getRef
Get the project reference for the JMX connection.- Returns:
- the project reference
-
setRef
Set the project reference for the JMX connection.- Parameters:
refId- the reference to set
-
getJMXConnection
Get JMXConnection (default look at jmx.server project reference from jmxOpen Task).- Returns:
- active JMXConnection
- Throws:
MalformedURLException- Invalid URL for JMX serverIOException- Connection error
-
accessJMXValue
-