Class 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.Condition
    Base class for JMX accessor conditions.
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • 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.String accessJMXValue()
      Get value from MBeans attribute.
      java.lang.String getAttribute()
      Get the attribute name.
      java.lang.String getHost()
      Get the JMX host.
      protected javax.management.MBeanServerConnection getJMXConnection()
      Get JMXConnection (default look at jmx.server project reference from jmxOpen Task).
      java.lang.String getName()
      Get the MBean object name.
      java.lang.String getPassword()
      Get the JMX password.
      java.lang.String getPort()
      Get the JMX port.
      java.lang.String getRef()
      Get the project reference for the JMX connection.
      java.lang.String getUrl()
      Get the JMX URL.
      java.lang.String getUsername()
      Get the JMX username.
      java.lang.String getValue()
      Get the expected attribute value.
      void setAttribute​(java.lang.String attribute)
      Set the attribute name.
      void setHost​(java.lang.String host)
      Set the JMX host.
      void setName​(java.lang.String objectName)
      Set the MBean object name.
      void setPassword​(java.lang.String password)
      Set the JMX password.
      void setPort​(java.lang.String port)
      Set the JMX port.
      void setRef​(java.lang.String refId)
      Set the project reference for the JMX connection.
      void setUrl​(java.lang.String url)
      Set the JMX URL.
      void setUsername​(java.lang.String username)
      Set the JMX username.
      void setValue​(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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.tools.ant.taskdefs.condition.Condition

        eval
    • Constructor Detail

      • JMXAccessorConditionBase

        public JMXAccessorConditionBase()
        Constructs a new JMXAccessorConditionBase.
    • 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.IOException
        Get JMXConnection (default look at jmx.server project reference from jmxOpen Task).
        Returns:
        active JMXConnection
        Throws:
        java.net.MalformedURLException - Invalid URL for JMX server
        java.io.IOException - Connection error
      • accessJMXValue

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