Java Doc for JMXAccessorCondition.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » ant » jmx » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.ant.jmx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.catalina.ant.jmx.JMXAccessorCondition

JMXAccessorCondition
public class JMXAccessorCondition extends ProjectComponent implements Condition(Code)
Definition:
 
 <path id="catalina_ant">
 <fileset dir="${catalina.home}/server/lib">
 <include name="catalina-ant.jar"/>
 <include name="catalina-ant-jmx.jar"/>
 </fileset>
 </path>
 <typedef
 name="jmxCondition"
 classname="org.apache.catalina.ant.jmx.JMXAccessorCondition"
 classpathref="catalina_ant"/>
 <taskdef
 name="jmxOpen"
 classname="org.apache.catalina.ant.jmx.JMXAccessorTask"
 classpathref="catalina_ant"/>
 
Usage: Wait for start backup node
 <target name="wait">
 <jmxOpen
 host="${jmx.host}" port="${jmx.port}" username="${jmx.username}" password="${jmx.password}" />
 <waitfor maxwait="${maxwait}" maxwaitunit="second" timeoutproperty="server.timeout" >
 <and>
 <socket server="${server.name}" port="${server.port}"/>
 <http url="${url}"/>
 <jmxCondition
 name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.111.1,senderPort=9025"
 operation="==" 
 attribute="connected" value="true"
 />
 <jmxCondition
 operation="&lt;"
 name="Catalina:j2eeType=WebModule,name=//${tomcat.application.host}${tomcat.application.path},J2EEApplication=none,J2EEServer=none"
 attribute="startupTime" value="250"
 />
 </and>
 </waitfor>
 <fail if="server.timeout" message="Server ${url} don't answer inside ${maxwait} sec" />
 <echo message="Server ${url} alive" />
 </target>
 
Allowed operation between jmx attribute and reference value:
  • == equals
  • != not equals
  • > greater than (&gt;)
  • >= greater than or equals (&gt;=)
  • < lesser than (&lt;)
  • <= lesser than or equals (&lt;=)
NOTE: For numeric expressions the type must be set and use xml entities as operations.
As type we currently support long and double.
author:
   Peter Rossbach
version:
   $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
since:
   5.5.10




Method Summary
protected  StringaccessJMXValue()
    
public  booleaneval()
     This method evaluates the condition It support for operation ">,>=,<,<=" the types long and double.
public  StringgetAttribute()
    
public  StringgetHost()
    
public  StringgetIf()
    
public  StringgetInfo()
     Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.
protected  MBeanServerConnectiongetJMXConnection()
    
public  StringgetName()
    
public  StringgetOperation()
    
public  StringgetPassword()
    
public  StringgetPort()
    
public  StringgetRef()
    
public  StringgetType()
    
public  StringgetUnless()
    
public  StringgetUrl()
    
public  StringgetUsername()
    
public  StringgetValue()
    
public  voidsetAttribute(String attribute)
    
public  voidsetHost(String host)
    
public  voidsetIf(String c)
     Only execute if a property of the given name exists in the current project.
public  voidsetName(String objectName)
    
public  voidsetOperation(String operation)
    
public  voidsetPassword(String password)
    
public  voidsetPort(String port)
    
public  voidsetRef(String refId)
    
public  voidsetType(String type)
    
public  voidsetUnless(String c)
     Only execute if a property of the given name does not exist in the current project.
public  voidsetUrl(String url)
    
public  voidsetUsername(String username)
    
public  voidsetValue(String value)
    
protected  booleantestIfCondition()
    
protected  booleantestUnlessCondition()
    



Method Detail
accessJMXValue
protected String accessJMXValue()(Code)
Get value from MBeans attribute The value



eval
public boolean eval()(Code)
This method evaluates the condition It support for operation ">,>=,<,<=" the types long and double. expression jmxValue operation value



getAttribute
public String getAttribute()(Code)
Returns the attribute.



getHost
public String getHost()(Code)
Returns the host.



getIf
public String getIf()(Code)
Returns the ifCondition.



getInfo
public String getInfo()(Code)
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.



getJMXConnection
protected MBeanServerConnection getJMXConnection() throws MalformedURLException, IOException(Code)
Get JMXConnection (default look at jmx.server project reference from jmxOpen Task) active JMXConnection
throws:
  MalformedURLException -
throws:
  IOException -



getName
public String getName()(Code)
Returns the name.



getOperation
public String getOperation()(Code)
Returns the operation.



getPassword
public String getPassword()(Code)
Returns the password.



getPort
public String getPort()(Code)
Returns the port.



getRef
public String getRef()(Code)
Returns the ref.



getType
public String getType()(Code)
Returns the type.



getUnless
public String getUnless()(Code)
Returns the unlessCondition.



getUrl
public String getUrl()(Code)
Returns the url.



getUsername
public String getUsername()(Code)
Returns the username.



getValue
public String getValue()(Code)
Returns the value.



setAttribute
public void setAttribute(String attribute)(Code)

Parameters:
  attribute - The attribute to set.



setHost
public void setHost(String host)(Code)

Parameters:
  host - The host to set.



setIf
public void setIf(String c)(Code)
Only execute if a property of the given name exists in the current project.
Parameters:
  c - property name



setName
public void setName(String objectName)(Code)

Parameters:
  objectName - The name to set.



setOperation
public void setOperation(String operation)(Code)

Parameters:
  operation - The operation to set.



setPassword
public void setPassword(String password)(Code)

Parameters:
  password - The password to set.



setPort
public void setPort(String port)(Code)

Parameters:
  port - The port to set.



setRef
public void setRef(String refId)(Code)

Parameters:
  refId - The ref to set.



setType
public void setType(String type)(Code)

Parameters:
  type - The type to set.



setUnless
public void setUnless(String c)(Code)
Only execute if a property of the given name does not exist in the current project.
Parameters:
  c - property name



setUrl
public void setUrl(String url)(Code)

Parameters:
  url - The url to set.



setUsername
public void setUsername(String username)(Code)

Parameters:
  username - The username to set.



setValue
public void setValue(String value)(Code)



testIfCondition
protected boolean testIfCondition()(Code)
test the if condition true if there is no if condition, or the named property exists



testUnlessCondition
protected boolean testUnlessCondition()(Code)
test the unless condition true if there is no unless condition,or there is a named property but it doesn't exist



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.