JMXAccessorEqualsCondition (Apache Tomcat 7.0.108 API Documentation)

org.apache.catalina.ant.jmx

## Class JMXAccessorEqualsCondition

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.catalina.ant.jmx.JMXAccessorConditionBase
    - - org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition

- All Implemented Interfaces:
    Cloneable, org.apache.tools.ant.taskdefs.condition.Condition

      public class JMXAccessorEqualsCondition
      extends JMXAccessorConditionBase

  Definition

         <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>

  Since:
    5.5.10
  Author:
    Peter Rossbach

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMXAccessorEqualsCondition()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `eval()`
    `String` | `getInfo()` Return descriptive information about this implementation and the corresponding version number, in the format `<description>/<version>`.

    - ### Methods inherited from class org.apache.catalina.ant.jmx.JMXAccessorConditionBase

      `accessJMXValue, getAttribute, getHost, getJMXConnection, getName, getPassword, getPort, getRef, getUrl, getUsername, getValue, setAttribute, setHost, setName, setPassword, setPort, setRef, setUrl, setUsername, setValue`

    - ### 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`

- - ### Constructor Detail

    - #### JMXAccessorEqualsCondition

          public JMXAccessorEqualsCondition()

  - ### Method Detail

    - #### getInfo

          public String getInfo()

      Return descriptive information about this implementation and the corresponding version number, in the format `<description>/<version>`.

    - #### eval

          public boolean eval()

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.