Java Doc for AccumulateMonitor.java in  » UML » MetaBoss » com » jamonapi » 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 » UML » MetaBoss » com.jamonapi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jamonapi.AccumulateMonitor

All known Subclasses:   com.jamonapi.TimeStatsMonitor,  com.jamonapi.ActiveStatsMonitor,  com.jamonapi.TimeStatsDistMonitor,  com.jamonapi.LastAccessMonitor,
AccumulateMonitor
public class AccumulateMonitor implements AccumulateMonitorInterface(Code)
AccumulateMonitors represent Monitors that increase in value. AccumulateMonitors use the Gang of 4's decorator pattern to pass method invocations to the next Monitor in the chain. Note many of the public methods such as start(), stop() and reset() call the same method of next Monitor in the decorator chain. Any classes that inherit from AccumulateMonitor implement the protected methods startThis(), stopThis(), and resetThis() and leave the public methods as is. In general the various ...This() (startThis(), stopThis(), resetThis()) methods perform the action on that instance and the methods without ...This() (start(), stop(), reset()) take care of passing the command down the decorator chain.


Field Summary
final protected static  StringACTIVE
    
final protected static  StringAVG
    
final protected static  StringAVGACTIVE
    
final protected static  StringHITS
    
final protected static  StringMAX
    
final protected static  StringMAXACTIVE
    
final protected static  StringMILLISECONDS
    
final protected static  StringMIN
    
final protected static  StringNONE
    
final protected static  StringSTANDARD_DEVIATION
    
final protected static  StringTOTAL
    
protected  longaccrued
    

Constructor Summary
public  AccumulateMonitor()
     Default constructor. Note Monitors use the Gang of 4 decorator pattern where each monitor points to and calls the next monitor in the chain.
public  AccumulateMonitor(AccumulateMonitorInterface childMonitor)
     Monitors use the Gang of 4 decorator pattern where each monitor points to and calls the next monitor in the chain.

Method Summary
protected static  StringconvertToString(double value)
    
public synchronized  longgetAccrued()
     Get the value of the monitor.
public  StringgetAccruedString()
    
public  voidgetData(ArrayList rowData)
    
protected  voidgetDataThis(ArrayList rowData)
     Add this Monitor's accrued value in string format to an ArrayList.
protected  StringgetDisplayString(String type, String value, String units)
    
public  voidgetHeader(ArrayList header)
     Add the display header that is associated with this Monitor to the header (as an ArrayList entry).
protected  voidgetHeaderThis(ArrayList header)
    
public  StringgetType()
    
public  StringgetUnits()
    
public  voidincrease(long increaseValue)
     Increase the monitors accrued value by the ammount specified in the parameter, and call increase on all monitors in the decorator chain.
public  voidincrease()
     Increase the monitors accrued value by 1 unit.
protected synchronized  voidincreaseThis(long increase)
    
public  booleanisPrimary()
     Indicates whether or not this Monitor is primary.
public static  voidmain(String[] args)
     Method that calls test code for this class.
public  voidreset()
    
protected synchronized  voidresetThis()
    
public  voidsetPrimary(boolean primary)
     Specify whether or not this Monitor is primary.
public  voidstart()
     Start gathering statistics for this Monitor.
protected  voidstartThis()
    
public  voidstop()
     Stop gathering statistics for the Monitor.
protected  voidstopThis()
    
public  StringtoString()
    
protected  StringtoStringChild()
    
protected synchronized  StringtoStringThis()
    

Field Detail
ACTIVE
final protected static String ACTIVE(Code)



AVG
final protected static String AVG(Code)



AVGACTIVE
final protected static String AVGACTIVE(Code)



HITS
final protected static String HITS(Code)



MAX
final protected static String MAX(Code)



MAXACTIVE
final protected static String MAXACTIVE(Code)



MILLISECONDS
final protected static String MILLISECONDS(Code)



MIN
final protected static String MIN(Code)



NONE
final protected static String NONE(Code)



STANDARD_DEVIATION
final protected static String STANDARD_DEVIATION(Code)



TOTAL
final protected static String TOTAL(Code)



accrued
protected long accrued(Code)




Constructor Detail
AccumulateMonitor
public AccumulateMonitor()(Code)
Default constructor. Note Monitors use the Gang of 4 decorator pattern where each monitor points to and calls the next monitor in the chain. With the default constructor there is no need for a next Monitors in the chain, but to keep the logic identical to when there is a next Monitor in the chain a NullMonitor (that does nothing) is used as the next Monitor to call in the decorator pattern. Martin Fowler's Refactoring book discusses NullMonitor's.



AccumulateMonitor
public AccumulateMonitor(AccumulateMonitorInterface childMonitor)(Code)
Monitors use the Gang of 4 decorator pattern where each monitor points to and calls the next monitor in the chain. This constructor as its argument takes the next AccumulateMonitor in the chain. Sample Call: AccumulateMonitor mon=new AccumulateMonitor(new AccumulateMonitor(new AccumulateMonitor()));




Method Detail
convertToString
protected static String convertToString(double value)(Code)
Convert a float value to a String Sample Call: String number=AccumulateMonitor.convertToString(1234.5); // returns 1,234.5



getAccrued
public synchronized long getAccrued()(Code)
Get the value of the monitor. What this value means depends on what the monitor does. In the case of a Timing monitor it would be the elapsed time since the monitor was started. Sample call: long accrued=monitor.getAccrued();



getAccruedString
public String getAccruedString()(Code)
Return the accrued value in String format *



getData
public void getData(ArrayList rowData)(Code)
Populate the ArrayList with data from this Monitor as well as all other Monitors in the decorator chain *



getDataThis
protected void getDataThis(ArrayList rowData)(Code)
Add this Monitor's accrued value in string format to an ArrayList. *



getDisplayString
protected String getDisplayString(String type, String value, String units)(Code)



getHeader
public void getHeader(ArrayList header)(Code)
Add the display header that is associated with this Monitor to the header (as an ArrayList entry). Also give all Monitors in the decorator chain the opportunity to add their header entries.



getHeaderThis
protected void getHeaderThis(ArrayList header)(Code)



getType
public String getType()(Code)
Display this Monitors type *



getUnits
public String getUnits()(Code)
Dispay the units appropriate for this monitor *



increase
public void increase(long increaseValue)(Code)
Increase the monitors accrued value by the ammount specified in the parameter, and call increase on all monitors in the decorator chain. Sample Call: monitor.increase(100);



increase
public void increase()(Code)
Increase the monitors accrued value by 1 unit. Sample Call: monitor.increase();



increaseThis
protected synchronized void increaseThis(long increase)(Code)
Add the value passed to this method to the Monitor's accrued value *



isPrimary
public boolean isPrimary()(Code)
Indicates whether or not this Monitor is primary. See www.jamonapi.com for an explanation of primary Monitors. *



main
public static void main(String[] args) throws Exception(Code)
Method that calls test code for this class. *



reset
public void reset()(Code)
Erase/wipe out any accrued statistics for this monitor, and call reset on all monitors in the decorator chain Sample Call: monitor.reset();



resetThis
protected synchronized void resetThis()(Code)
Erase/wipe out any accrued statistics for this monitor *



setPrimary
public void setPrimary(boolean primary)(Code)
Specify whether or not this Monitor is primary. See www.jamonapi.com for an explanation of primary Monitors. Call setPrimary() for all Monitors in the decorator chain



start
public void start()(Code)
Start gathering statistics for this Monitor. The Monitor will run until the stop() method is called. start() will also call the start() method for all other Monitors in the decorator chain.



startThis
protected void startThis()(Code)
Contains any logic that this Monitor must perform when it is started *



stop
public void stop()(Code)
Stop gathering statistics for the Monitor. stop() is called after a Monitor has been started with the start() method. stop() will also call the stop() method for all Monitors in the decorator chain.



stopThis
protected void stopThis()(Code)
Contains any logic that this Monitor must perform when it is stopped *



toString
public String toString()(Code)
Display this Monitor as well as all Monitor's in the decorator chain as Strings *



toStringChild
protected String toStringChild()(Code)
Display Monitor's in the Decorator chain in String format *



toStringThis
protected synchronized String toStringThis()(Code)
Display this Monitor in String format *



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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