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.
  • Constructor Details

    • JMXAccessorConditionBase

      public JMXAccessorConditionBase()
      Constructs a new JMXAccessorConditionBase.
  • Method Details

    • getAttribute

      public String getAttribute()
      Get the attribute name.
      Returns:
      the attribute name
    • setAttribute

      public void setAttribute(String attribute)
      Set the attribute name.
      Parameters:
      attribute - the attribute name to set
    • getHost

      public String getHost()
      Get the JMX host.
      Returns:
      the JMX host
    • setHost

      public void setHost(String host)
      Set the JMX host.
      Parameters:
      host - the host to set
    • getName

      public String getName()
      Get the MBean object name.
      Returns:
      the MBean object name
    • setName

      public void setName(String objectName)
      Set the MBean object name.
      Parameters:
      objectName - the name to set
    • getPassword

      public String getPassword()
      Get the JMX password.
      Returns:
      the JMX password
    • setPassword

      public void setPassword(String password)
      Set the JMX password.
      Parameters:
      password - the password to set
    • getPort

      public String getPort()
      Get the JMX port.
      Returns:
      the JMX port
    • setPort

      public void setPort(String port)
      Set the JMX port.
      Parameters:
      port - the port to set
    • getUrl

      public String getUrl()
      Get the JMX URL.
      Returns:
      the JMX URL
    • setUrl

      public void setUrl(String url)
      Set the JMX URL.
      Parameters:
      url - the URL to set
    • getUsername

      public String getUsername()
      Get the JMX username.
      Returns:
      the JMX username
    • setUsername

      public void setUsername(String username)
      Set the JMX username.
      Parameters:
      username - the username to set
    • getValue

      public String getValue()
      Get the expected attribute value.
      Returns:
      the expected attribute value
    • setValue

      public void setValue(String value)
      Set the expected attribute value.
      Parameters:
      value - the value to set
    • getRef

      public String getRef()
      Get the project reference for the JMX connection.
      Returns:
      the project reference
    • setRef

      public void setRef(String refId)
      Set the project reference for the JMX connection.
      Parameters:
      refId - the reference to set
    • getJMXConnection

      protected MBeanServerConnection getJMXConnection() throws MalformedURLException, IOException
      Get JMXConnection (default look at jmx.server project reference from jmxOpen Task).
      Returns:
      active JMXConnection
      Throws:
      MalformedURLException - Invalid URL for JMX server
      IOException - Connection error
    • accessJMXValue

      protected String accessJMXValue()
      Get value from MBeans attribute.
      Returns:
      The value