Java Doc for MeasureFactory.java in  » Profiler » JMeasurement » de » mcs » jmeasurement » 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 » Profiler » JMeasurement » de.mcs.jmeasurement 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.mcs.jmeasurement.MeasureFactory

MeasureFactory
final public class MeasureFactory (Code)
This is the main entry point into the measurement system.
author:
   w.klaas

Inner Class :static class MeasureTask extends TimerTask

Field Summary
final static  StringXMLATT_APPNAME
     constants for xml writing and reading.
final static  StringXMLATT_CLASS
     constants for xml writing and reading.
final static  StringXMLATT_CREATED
     constants for xml writing and reading.
final static  StringXMLATT_NAME
     constants for xml writing and reading.
final static  StringXMLATT_VALUE
     constants for xml writing and reading.
final static  StringXMLNODE_MEASUREPOINTS
     constants for xml writing and reading.
final static  StringXMLNODE_POINT
     constants for xml writing and reading.
final static  StringXMLNODE_PROPERTY
     constants for xml writing and reading.
final static  StringXMLNODE_ROOT
     constants for xml writing and reading.
final static  StringXMLNODE_SNAPSHOT
     constants for xml writing and reading.
final static  StringXMLNODE_SNAPSHOTS
     constants for xml writing and reading.


Method Summary
public static  StringasString()
     This is the standard report feature with all Points as an text Report.
public static  voidclear()
     Clearing all measure data and measure points.
public static  booleanconfigure()
     load configuration from jmconfig.properties file in the classpath.
public static  booleanconfigure(File jmConfig)
     load configuration from the given properties file.
Parameters:
  jmConfig - the config file to load.
public static  StringgetApplicationName()
     Returns the applicationName.
public static  JMConfiggetConfig()
    
public static  intgetExceptionHandling()
    
public static  MeasureDataCallbackgetMeasureDataCallback()
     Returns the measureDataCallback object.
public static  MeasurePointgetMeasurePoint(String pointName)
     getting the desired measurement point.
public static  String[]getMeasurePointNames(String pointName)
     getting an array of measurement point names.
public static  MeasurePoint[]getMeasurePoints(String pointName)
     getting an array of measurement points.
public static  MonitorgetMonitor(String pointName)
     Getting a new monitor for the measurement point pointName.
public static  intgetPriority()
     Return the actual priority setting of the factory.
public static  StringgetReport(MeasureDataRenderer renderer)
     Getting a rendered report of the measure data.
public static  StringgetReport(String pointname, MeasureDataRenderer renderer)
     Getting a rendered report of the measure data.
public static  voidgetReport(String pointname, MeasureDataRenderer renderer, Writer output)
     Getting a rendered report of the measure data.
public static  SnapShotgetSnapShot(String snapshotname)
     getting a snapshot from the system.
public static  String[]getSnapShotNames()
     getting the names of all snapshots from the system.
public static  booleanisBackgroundProcessing()
     testing if backgorund processing is enabled.
public static  booleanisEnable()
     Returns if this factory can deliver monitors or not.
public static  voidloadFromXMLFile(String filename, boolean loadSnapShotData)
     Load the measurepoints from an external XML file.
public static  voidloadFromXMLStream(InputStream stream, boolean loadSnapShotData)
     Load the measurepoints with data from an inputstream.
public static  ObjectregisterInterface(Object object)
     Adding a Interface for automatic methode measurement.
public static  ObjectregisterInterface(Object object, String[] aMethodNames)
     Adding a Interface for automatic methode measurement.
public static  ObjectregisterInterface(Object object, boolean storeExceptions, boolean fullExceptions)
     Adding a Interface for automatic methode measurement.
public static  ObjectregisterInterface(Object object, boolean storeExceptions, boolean fullExceptions, String[] aMethodNames)
     Adding a Interface for automatic methode measurement.
Parameters:
  object - Interface to add
Parameters:
  storeExceptions - if the exception stacktraces should be stored.
Parameters:
  fullExceptions - full exceptions with stacktraces
Parameters:
  aMethodNames - list with all methodnames that should be monitored.
public static  voidregisterMBeans()
     registering the JMX extensions for JMeasurement in the standard MBean server of this platform.
public static  SnapShotremoveSnapShot(String snapshotname)
     removing a snapshot from the system.
public static  voidsaveSnapShot(SnapShot snapshot, File file)
     save snapshot as XMl.
public static  voidsaveToXMLFile(String filename)
     saving all measurementpoints to an xml file structure for later reloading with loadFromXMLFile().
public static  voidsaveToXMLStream(OutputStream stream)
     saving all measurementpoints to an xml file structure for later reloading.
public static  voidsetApplicationName(String aApplicationName)
     Setting the application name.
public static  voidsetBackgroundProcessing(boolean enableBackground)
     starting and stopping background processing.
public static  voidsetEnable(boolean aEnable)
     This methode will enable the monitor factory.
public static  voidsetExceptionHandling(int aExceptionHandling)
     setting the value of the exception handling.
public static  voidsetMeasureDataCallback(MeasureDataCallback aMeasureDataCallback)
     setting the measureDataCallback object.
public static  voidsetOption(String aOptionName, String aOptionValue)
     setting some special options for this factory.
public static  voidsetOptions(Map<String, String> aOptions)
     Setting a bunch of options.
public static  voidsetPriority(int aPriority)
     Setting the actual priority of the factory.
public static  Monitorstart(String pointName)
     Getting a new monitor for the measurement point pointName and starting this monitor.
public static  SnapShottakeSnapshot(String snapshotname)
     new methode for making a snapshot.

Field Detail
XMLATT_APPNAME
final static String XMLATT_APPNAME(Code)
constants for xml writing and reading.



XMLATT_CLASS
final static String XMLATT_CLASS(Code)
constants for xml writing and reading.



XMLATT_CREATED
final static String XMLATT_CREATED(Code)
constants for xml writing and reading.



XMLATT_NAME
final static String XMLATT_NAME(Code)
constants for xml writing and reading.



XMLATT_VALUE
final static String XMLATT_VALUE(Code)
constants for xml writing and reading.



XMLNODE_MEASUREPOINTS
final static String XMLNODE_MEASUREPOINTS(Code)
constants for xml writing and reading.



XMLNODE_POINT
final static String XMLNODE_POINT(Code)
constants for xml writing and reading.



XMLNODE_PROPERTY
final static String XMLNODE_PROPERTY(Code)
constants for xml writing and reading.



XMLNODE_ROOT
final static String XMLNODE_ROOT(Code)
constants for xml writing and reading.



XMLNODE_SNAPSHOT
final static String XMLNODE_SNAPSHOT(Code)
constants for xml writing and reading.



XMLNODE_SNAPSHOTS
final static String XMLNODE_SNAPSHOTS(Code)
constants for xml writing and reading.





Method Detail
asString
public static String asString()(Code)
This is the standard report feature with all Points as an text Report. the string representation of this measurement factory



clear
public static void clear()(Code)
Clearing all measure data and measure points.



configure
public static boolean configure()(Code)
load configuration from jmconfig.properties file in the classpath. true if the file could be loaded, otherwisefalse.



configure
public static boolean configure(File jmConfig)(Code)
load configuration from the given properties file.
Parameters:
  jmConfig - the config file to load. true if the file could be loaded, otherwisefalse.



getApplicationName
public static String getApplicationName()(Code)
Returns the applicationName. String Returns the applicationName.



getConfig
public static JMConfig getConfig()(Code)
getting the actual config object.



getExceptionHandling
public static int getExceptionHandling()(Code)
value of exception handling



getMeasureDataCallback
public static MeasureDataCallback getMeasureDataCallback()(Code)
Returns the measureDataCallback object. Returns the measureDataCallback.



getMeasurePoint
public static MeasurePoint getMeasurePoint(String pointName)(Code)
getting the desired measurement point. If it doesn't exists it will be created.
Parameters:
  pointName - name of the desired point (fully qualified) MeasurePoint the desired MeasurePoint



getMeasurePointNames
public static String[] getMeasurePointNames(String pointName)(Code)
getting an array of measurement point names. The pointname is a regular expression of the desired points.
Parameters:
  pointName - regular expression of the desired point names (or null for allpoints) String[] the desired MeasurePointNames



getMeasurePoints
public static MeasurePoint[] getMeasurePoints(String pointName)(Code)
getting an array of measurement points. The pointname is a regular expression of the desired points.
Parameters:
  pointName - regular expression of the desired point names (or null for allpoints) MeasurePoint[] the desired MeasurePoints



getMonitor
public static Monitor getMonitor(String pointName)(Code)
Getting a new monitor for the measurement point pointName. If the point doesn't exists, it wil be created.
Parameters:
  pointName - name of the measurement point to use. Monitor



getPriority
public static int getPriority()(Code)
Return the actual priority setting of the factory. Returns the priority.



getReport
public static String getReport(MeasureDataRenderer renderer) throws RendererMustNotBeNullException(Code)
Getting a rendered report of the measure data. All points be evaluating. To get some report the renderer must be given. If not, RendererMustNotBeNullException will be thrown.
Parameters:
  renderer - the renderer to use for this report a string with the report
throws:
  RendererMustNotBeNullException - thrown, if the renderer is not set.



getReport
public static String getReport(String pointname, MeasureDataRenderer renderer) throws RendererMustNotBeNullException(Code)
Getting a rendered report of the measure data. The points in the requested report will be evaluating with the point string. To get some report the renderer must be given. If not, RendererMustNotBeNullException will be thrown.
Parameters:
  pointname - regular expression to match the point names (or null for allpoints)
Parameters:
  renderer - the renderer to use for this report a string with the report
throws:
  RendererMustNotBeNullException - thrown, if the renderer is not set.



getReport
public static void getReport(String pointname, MeasureDataRenderer renderer, Writer output) throws RendererMustNotBeNullException, IOException(Code)
Getting a rendered report of the measure data. The points in the requested report will be evaluating with the point string. To get some report the renderer must be given. If not, RendererMustNotBeNullException will be thrown.
Parameters:
  pointname - regular expression to match the point names (or null for allpoints)
Parameters:
  renderer - the renderer to use for this report
Parameters:
  output - the writer to output the report
throws:
  RendererMustNotBeNullException - thrown, if the renderer is not set.
throws:
  IOException - if something goes wrong with the writer IO operation.



getSnapShot
public static SnapShot getSnapShot(String snapshotname)(Code)
getting a snapshot from the system.
Parameters:
  snapshotname - name of the snapshot to get the desired snapshot or null if no snapshot withthis name is present.



getSnapShotNames
public static String[] getSnapShotNames()(Code)
getting the names of all snapshots from the system. String[] array with all snapshot names .



isBackgroundProcessing
public static boolean isBackgroundProcessing()(Code)
testing if backgorund processing is enabled. true if background processing is enabled,otherwise false
since:
   0.68



isEnable
public static boolean isEnable()(Code)
Returns if this factory can deliver monitors or not. boolean true if this factory can deliver monitorsor false.



loadFromXMLFile
public static void loadFromXMLFile(String filename, boolean loadSnapShotData) throws IOException, SAXException, MeasurementException(Code)
Load the measurepoints from an external XML file. (Possible saved with saveToXMLFile)
See Also:   MeasureFactory.saveToXMLFile(String)
Parameters:
  filename - xml file
Parameters:
  loadSnapShotData - loading the snapshot data if present.
throws:
  IOException - if something goes wrong
throws:
  SAXException - if something goes wrong
throws:
  MeasurementException - if something goes wrong



loadFromXMLStream
public static void loadFromXMLStream(InputStream stream, boolean loadSnapShotData) throws IOException, SAXException, MeasurementException(Code)
Load the measurepoints with data from an inputstream.
Parameters:
  stream - InputStream to load the measure data from
Parameters:
  loadSnapShotData - loading the snapshot data if present.
throws:
  IOException - if something goes wrong with reading of the desired xmlstream
throws:
  SAXException - if something goes wrong with reading of the desired xmlstream
throws:
  MeasurementException - if something goes wrong



registerInterface
public static Object registerInterface(Object object)(Code)
Adding a Interface for automatic methode measurement. Exception handling as defined here.
Parameters:
  object - Interface to add the interface to the proxy class.
since:
   0.66



registerInterface
public static Object registerInterface(Object object, String[] aMethodNames)(Code)
Adding a Interface for automatic methode measurement. Exception handling as defined here.
Parameters:
  object - Interface to add
Parameters:
  aMethodNames - names of the methodes to monitor. null if allmethodes should be monitored.
since:
   0.72 If you wan't to define an argument as a point name you can
since:
   use the following syntax for the method name: <method
since:
   name>[.arg<index of argument>] the interface to the proxy class.
since:
   0.66



registerInterface
public static Object registerInterface(Object object, boolean storeExceptions, boolean fullExceptions)(Code)
Adding a Interface for automatic methode measurement.
Parameters:
  object - Interface to add
Parameters:
  storeExceptions - if the exception stacktraces should be stored.
Parameters:
  fullExceptions - full exceptions with stacktraces the interface to the proxy class.
since:
   0.64



registerInterface
public static Object registerInterface(Object object, boolean storeExceptions, boolean fullExceptions, String[] aMethodNames)(Code)
Adding a Interface for automatic methode measurement.
Parameters:
  object - Interface to add
Parameters:
  storeExceptions - if the exception stacktraces should be stored.
Parameters:
  fullExceptions - full exceptions with stacktraces
Parameters:
  aMethodNames - list with all methodnames that should be monitored. If thisparameter is null all methods will be monitored.
since:
   0.72 If you wan't to define an argument as a point name you can
since:
   use the following syntax for the method name: <method
since:
   name>[.arg<index of argument>] the interface to the proxy class.
since:
   0.64



registerMBeans
public static void registerMBeans() throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException(Code)
registering the JMX extensions for JMeasurement in the standard MBean server of this platform.
throws:
  NotCompliantMBeanException - if something goes wrong with the registration
throws:
  MBeanRegistrationException - if something goes wrong with the registration
throws:
  InstanceAlreadyExistsException - if something goes wrong with the registration



removeSnapShot
public static SnapShot removeSnapShot(String snapshotname)(Code)
removing a snapshot from the system.
Parameters:
  snapshotname - name of the snapshot to remove the removed snapshot or null if no snapshot withthis name is present.



saveSnapShot
public static void saveSnapShot(SnapShot snapshot, File file) throws SAXException, IOException(Code)
save snapshot as XMl.
Parameters:
  snapshot - the snapshot to save.
Parameters:
  file - the file to save to.
throws:
  SAXException - if something goes wrong.
throws:
  IOException - if something goes wrong.



saveToXMLFile
public static void saveToXMLFile(String filename) throws IOException, SAXException(Code)
saving all measurementpoints to an xml file structure for later reloading with loadFromXMLFile().
See Also:   MeasureFactory.loadFromXMLFile(String,boolean)
Parameters:
  filename - filename of the file to save xml to
throws:
  IOException - if something goes wrong in the filesystem.
throws:
  SAXException - if something goes wrong with xml writing



saveToXMLStream
public static void saveToXMLStream(OutputStream stream) throws IOException, SAXException(Code)
saving all measurementpoints to an xml file structure for later reloading.
Parameters:
  stream - the output stream to write the xml data to.
throws:
  IOException - if something goes wrong in the filesystem.
throws:
  SAXException - if something goes wrong with xml writing



setApplicationName
public static void setApplicationName(String aApplicationName)(Code)
Setting the application name.
Parameters:
  aApplicationName - The applicationName to set.



setBackgroundProcessing
public static void setBackgroundProcessing(boolean enableBackground)(Code)
starting and stopping background processing.
Parameters:
  enableBackground - true to allow background processing, otherwisefalse
since:
   0.68



setEnable
public static void setEnable(boolean aEnable)(Code)
This methode will enable the monitor factory. If it's set to false, start() methode will only return NullMoniotr Objects.
This value has no influenz on the start() methode of the MeasurementsPoints. They will return normal monitor objects even when the factory is turned of.
Parameters:
  aEnable - The enable to set.



setExceptionHandling
public static void setExceptionHandling(int aExceptionHandling)(Code)
setting the value of the exception handling.
Parameters:
  aExceptionHandling - one of the constants for exception handling.



setMeasureDataCallback
public static void setMeasureDataCallback(MeasureDataCallback aMeasureDataCallback)(Code)
setting the measureDataCallback object.
Parameters:
  aMeasureDataCallback - The measureDataCallback to set.



setOption
public static void setOption(String aOptionName, String aOptionValue)(Code)
setting some special options for this factory. Possible option names are:
  • OPTION_DISABLE_DEVIATION disable calcualtion of the deviation. Possible values are true,false.
  • OPTION_ENABLE_AUTOSNAPSHOT Enable the automatic snapshot system. Possible values are true,false.
  • OPTION_BACKGROUND_TIME Time (in msec) to generate a new snapshot and to prove the memory saving settings.
  • OPTION_ENABLE_MEMORY_SAVINGS Enable the automatic memory saving system. All not actually needed measure points and snapshots will be save to the harddisk. To detemine where to sstore the data, use the OPTIONS_WORKINGPATH. Possible values are true,false.
  • OPTION_WORKINGPATH Path where to store the measuredata for memory savings.
  • OPTION_POINT_IDLETIME Time (in sec) how long a point must be idle before it will be saved to disk.
The memory savings and the auto snapshot feature will start a background process, which is controlled by the MeasureFactory.setBackgroundProcessing(boolean) method. If you wan't to suspend the feature, set the background processing to false. But don't forget to set it back to true, if you are ready. If you set MeasureFactory.OPTION_BACKGROUND_TIME you have to manually enable the background processing via MeasureFactory.setBackgroundProcessing(boolean) . If you use the method MeasureFactory.setOptions(Map) the background processing wil automatically started.
Parameters:
  aOptionName - the option that should be set.
Parameters:
  aOptionValue - value of this option as String
since:
   0.67



setOptions
public static void setOptions(Map<String, String> aOptions)(Code)
Setting a bunch of options. MeasureFactory.setOption(StringString)
Parameters:
  aOptions - a map with all options.
since:
   0.68



setPriority
public static void setPriority(int aPriority)(Code)
Setting the actual priority of the factory.
Parameters:
  aPriority - The priority to set.



start
public static Monitor start(String pointName)(Code)
Getting a new monitor for the measurement point pointName and starting this monitor. If the point doesn't exists, it wil be created.
Parameters:
  pointName - name of the measurement point to use. Monitor



takeSnapshot
public static SnapShot takeSnapshot(String snapshotname)(Code)
new methode for making a snapshot. In a snapshot all measure points data will be saved under the desired name. All Snapshot data will be saved into the xml files and will be renderd, if desired. The Snapshot will contains some individual data like the a memory snapshot.
Parameters:
  snapshotname - name of the snapshot. the snapshot



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.