Package org.apache.catalina.ant.jmx
Class JMXAccessorConditionBase
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.catalina.ant.jmx.JMXAccessorConditionBase
-
- All Implemented Interfaces:
java.lang.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.ConditionBase class for JMX accessor conditions.
-
-
Constructor Summary
Constructors Constructor Description JMXAccessorConditionBase()Constructs a new JMXAccessorConditionBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringaccessJMXValue()Get value from MBeans attribute.java.lang.StringgetAttribute()Get the attribute name.java.lang.StringgetHost()Get the JMX host.protected javax.management.MBeanServerConnectiongetJMXConnection()Get JMXConnection (default look at jmx.server project reference from jmxOpen Task).java.lang.StringgetName()Get the MBean object name.java.lang.StringgetPassword()Get the JMX password.java.lang.StringgetPort()Get the JMX port.java.lang.StringgetRef()Get the project reference for the JMX connection.java.lang.StringgetUrl()Get the JMX URL.java.lang.StringgetUsername()Get the JMX username.java.lang.StringgetValue()Get the expected attribute value.voidsetAttribute(java.lang.String attribute)Set the attribute name.voidsetHost(java.lang.String host)Set the JMX host.voidsetName(java.lang.String objectName)Set the MBean object name.voidsetPassword(java.lang.String password)Set the JMX password.voidsetPort(java.lang.String port)Set the JMX port.voidsetRef(java.lang.String refId)Set the project reference for the JMX connection.voidsetUrl(java.lang.String url)Set the JMX URL.voidsetUsername(java.lang.String username)Set the JMX username.voidsetValue(java.lang.String value)Set the expected attribute value.-
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
-
-
-
Method Detail
-
getAttribute
public java.lang.String getAttribute()
Get the attribute name.- Returns:
- the attribute name
-
setAttribute
public void setAttribute(java.lang.String attribute)
Set the attribute name.- Parameters:
attribute- the attribute name to set
-
getHost
public java.lang.String getHost()
Get the JMX host.- Returns:
- the JMX host
-
setHost
public void setHost(java.lang.String host)
Set the JMX host.- Parameters:
host- the host to set
-
getName
public java.lang.String getName()
Get the MBean object name.- Returns:
- the MBean object name
-
setName
public void setName(java.lang.String objectName)
Set the MBean object name.- Parameters:
objectName- the name to set
-
getPassword
public java.lang.String getPassword()
Get the JMX password.- Returns:
- the JMX password
-
setPassword
public void setPassword(java.lang.String password)
Set the JMX password.- Parameters:
password- the password to set
-
getPort
public java.lang.String getPort()
Get the JMX port.- Returns:
- the JMX port
-
setPort
public void setPort(java.lang.String port)
Set the JMX port.- Parameters:
port- the port to set
-
getUrl
public java.lang.String getUrl()
Get the JMX URL.- Returns:
- the JMX URL
-
setUrl
public void setUrl(java.lang.String url)
Set the JMX URL.- Parameters:
url- the URL to set
-
getUsername
public java.lang.String getUsername()
Get the JMX username.- Returns:
- the JMX username
-
setUsername
public void setUsername(java.lang.String username)
Set the JMX username.- Parameters:
username- the username to set
-
getValue
public java.lang.String getValue()
Get the expected attribute value.- Returns:
- the expected attribute value
-
setValue
public void setValue(java.lang.String value)
Set the expected attribute value.- Parameters:
value- the value to set
-
getRef
public java.lang.String getRef()
Get the project reference for the JMX connection.- Returns:
- the project reference
-
setRef
public void setRef(java.lang.String refId)
Set the project reference for the JMX connection.- Parameters:
refId- the reference to set
-
getJMXConnection
protected javax.management.MBeanServerConnection getJMXConnection() throws java.net.MalformedURLException, java.io.IOExceptionGet JMXConnection (default look at jmx.server project reference from jmxOpen Task).- Returns:
- active JMXConnection
- Throws:
java.net.MalformedURLException- Invalid URL for JMX serverjava.io.IOException- Connection error
-
accessJMXValue
protected java.lang.String accessJMXValue()
Get value from MBeans attribute.- Returns:
- The value
-
-