Java Doc for JMConfig.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.JMConfig

JMConfig
public class JMConfig (Code)
This class hold's all configuration settings for the MeasureFactory. It can load the configuration from a property file (with automatic file change checking) or an xml file. (Standard format) All defined options are declared as constants. All settings could be overridden by program, so they will not be reload automatically again. The simpelst configuration is to call the configure methode of the MeasureFactory. The property file will be searched automatically in the classpath and loaded. The class can save the actual settings to an property or xml file, too.
Here is an example of a jmconfig.properties file:

 OPTION_BACKGROUND_TIME=10000
 OPTION_ENABLE_AUTOSNAPSHOT=true
 OPTION_ENABLE_MEMORY_SAVINGS=true
 OPTION_POINT_IDLETIME=60000
 OPTION_WORKINGPATH=e\:\\temp\\data\\
 OPTION_EXCEPTION_HANDLING =2
 OPTION_ENABLE_MEASUREMENT=true
 OPTION_CONFIG_AUTOFILE=true
 OPTION_DISABLE_DEVIATION=false
 

author:
   w.klaas

Inner Class :static class JMDefault
Inner Class :class ConfigTask extends TimerTask

Field Summary
final public static  intEXCEPTION_COUNT
     constants for exception handling.
final public static  intEXCEPTION_NAME
     constants for exception handling.
final public static  intEXCEPTION_TRACE
     constants for exception handling.
final public static  StringOPTION_APPLICATION_NAME
     Name of the application under test.
final public static  StringOPTION_BACKGROUND_TIME
     Time (in msec) to process background thread.
final public static  StringOPTION_CONFIG_AUTOFILE
     automatically reload the config file.
final public static  StringOPTION_DISABLE_DEVIATION
     constant for deviation disabling.
final public static  StringOPTION_ENABLE_AUTOSNAPSHOT
     Enable the automatic snapshot system.
final public static  StringOPTION_ENABLE_MEASUREMENT
     constant for deviation disabling.
final public static  StringOPTION_ENABLE_MEMORY_SAVINGS
     Enable the automatic memory saving system.
final public static  StringOPTION_EXCEPTION_HANDLING
     exception handling.
final public static  StringOPTION_POINT_IDLETIME
     Enable the automatic memory saving system.
final public static  StringOPTION_WORKINGPATH
     Path where to store the measuredata.

Constructor Summary
public  JMConfig()
     constructing a new configuration with default values.

Method Summary
final public  booleanconfigure()
     load configuration from jmconfig.properties file in the classpath.
final public  booleanconfigure(File jmConfig)
     load configuration from the given file.
Parameters:
  jmConfig - the config file to load.
final public  booleangetBoolean(String key)
     getting a boolean setting.
final public  intgetInteger(String key)
     getting a integer setting.
final public  longgetLong(String key)
     getting a long setting.
final public  StringgetProperty(String key)
     getting a string setting.
final public  booleanisEnableMeasurement()
    
final public  voidremove(String key)
     removes the setting with the name as an overridden setting.
final public  voidsetBoolean(String key, boolean value)
     setting a boolean setting.
final public  voidsetEnableMeasurement(boolean value)
    
final public  voidsetInteger(String key, int value)
     setting a integer setting.
final public  voidsetLong(String key, long value)
     setting a long setting.
final public  voidsetProperty(String key, String value)
     setting a string setting.

Field Detail
EXCEPTION_COUNT
final public static int EXCEPTION_COUNT(Code)
constants for exception handling. Only counting.



EXCEPTION_NAME
final public static int EXCEPTION_NAME(Code)
constants for exception handling. Counting and activation and name.



EXCEPTION_TRACE
final public static int EXCEPTION_TRACE(Code)
constants for exception handling. Full stacktrace.



OPTION_APPLICATION_NAME
final public static String OPTION_APPLICATION_NAME(Code)
Name of the application under test.



OPTION_BACKGROUND_TIME
final public static String OPTION_BACKGROUND_TIME(Code)
Time (in msec) to process background thread.



OPTION_CONFIG_AUTOFILE
final public static String OPTION_CONFIG_AUTOFILE(Code)
automatically reload the config file.



OPTION_DISABLE_DEVIATION
final public static String OPTION_DISABLE_DEVIATION(Code)
constant for deviation disabling.



OPTION_ENABLE_AUTOSNAPSHOT
final public static String OPTION_ENABLE_AUTOSNAPSHOT(Code)
Enable the automatic snapshot system.



OPTION_ENABLE_MEASUREMENT
final public static String OPTION_ENABLE_MEASUREMENT(Code)
constant for deviation disabling.



OPTION_ENABLE_MEMORY_SAVINGS
final public static String OPTION_ENABLE_MEMORY_SAVINGS(Code)
Enable the automatic memory saving system.



OPTION_EXCEPTION_HANDLING
final public static String OPTION_EXCEPTION_HANDLING(Code)
exception handling.



OPTION_POINT_IDLETIME
final public static String OPTION_POINT_IDLETIME(Code)
Enable the automatic memory saving system.



OPTION_WORKINGPATH
final public static String OPTION_WORKINGPATH(Code)
Path where to store the measuredata.




Constructor Detail
JMConfig
public JMConfig()(Code)
constructing a new configuration with default values.




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



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



getBoolean
final public boolean getBoolean(String key)(Code)
getting a boolean setting.
Parameters:
  key - name of the setting value value of the setting



getInteger
final public int getInteger(String key)(Code)
getting a integer setting.
Parameters:
  key - name of the setting value value of the setting



getLong
final public long getLong(String key)(Code)
getting a long setting.
Parameters:
  key - name of the setting value value of the setting



getProperty
final public String getProperty(String key)(Code)
getting a string setting.
Parameters:
  key - name of the setting value value of the setting



isEnableMeasurement
final public boolean isEnableMeasurement()(Code)
the enableMeasurement



remove
final public void remove(String key)(Code)
removes the setting with the name as an overridden setting. So from now on the setting will be used as in the config file or as the default value.
Parameters:
  key - name of the setting to remove from the override setting list.



setBoolean
final public void setBoolean(String key, boolean value)(Code)
setting a boolean setting.
Parameters:
  key - name of the setting
Parameters:
  value - value of the setting



setEnableMeasurement
final public void setEnableMeasurement(boolean value)(Code)

Parameters:
  value - the enableMeasurement to set



setInteger
final public void setInteger(String key, int value)(Code)
setting a integer setting.
Parameters:
  key - name of the setting
Parameters:
  value - value of the setting



setLong
final public void setLong(String key, long value)(Code)
setting a long setting.
Parameters:
  key - name of the setting
Parameters:
  value - value of the setting



setProperty
final public void setProperty(String key, String value)(Code)
setting a string setting.
Parameters:
  key - name of the setting
Parameters:
  value - value of the setting



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.