All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spec.harness.SpecProps

spec.harness.SpecProps

public class SpecProps
This class is used to maintain the SpecJVMClient properties. User can edit these properties. These properties are part of the results sent in the e-mail format. These properties are used in processing the results.


Constructor Index

 o SpecProps(String)
Creates a new SPEC properties object, initialized with properties read from a file or URL "props/spec".
 o SpecProps(String, Color)
Creates a new SPEC properties object as above
 o SpecProps(String, String, String, String, Color)
Creates a new SPEC properties object, initialized with properties and titles read from files as above.

Method Index

 o get(String)
Get the property value associated with the key.
 o get(String, String)
Get the property value associated with the key, or if there is none then return the supplied default value
 o getBoolean(String)
Get the boolean property value associated with the key.
 o getProperties()
Get the java.util.Properties (all of them)
 o getTitle(String)
Get the title property value associated with the key.
 o isSetup()
Checks whether the user did the setup atleast once.
 o list(PrintStream)
Lists all the properties to the output stream provided
 o parametersChosen()
 o put(String, String)
Adds the Key and Hash to the Properties object
 o setup()
Shows the Setup dialog.
 o toString()
Overriden toString() method

Constructors

 o SpecProps
 public SpecProps(String baseDir)
Creates a new SPEC properties object, initialized with properties read from a file or URL "props/spec". The titles of those properties are given in "props/title". Those files are specified relative to a base directory which is typically the benchmark installation directory. The user is given an opportunity to override the default location of those files through a dialog box.

Parameters:
baseDir - base directory / URL prefix
 o SpecProps
 public SpecProps(String baseDir,
                  Color setupColor)
Creates a new SPEC properties object as above

Parameters:
baseDir - base directory / URL prefix
setupColor - background color of the setup screen
 o SpecProps
 public SpecProps(String baseDir,
                  String specFileName,
                  String userFileName,
                  String titleFileName,
                  Color setupColor)
Creates a new SPEC properties object, initialized with properties and titles read from files as above.

Parameters:
baseDir - base directory / URL prefix
specFileName - Default name of file with inital properties specified by SPEC. Path name is relative to baseDir
userFileName - full URL of file with inital properties specified by user
titleFileName - Default name of file with property titles. Path name is relative to baseDir

Methods

 o get
 public String get(String key)
Get the property value associated with the key.

Parameters:
key - key value
Returns:
property value (may be null if property does not exist) Note that both key and value are Strings, not general Objects
See Also:
get
 o get
 public String get(String key,
                   String def)
Get the property value associated with the key, or if there is none then return the supplied default value

Parameters:
key - key value
def - default value
Returns:
property value or def if property does not exist
 o getBoolean
 public boolean getBoolean(String key)
Get the boolean property value associated with the key.

Parameters:
key - key value
Returns:
property value (false if property does not exist) Note that key is a Strings, not general Objects
 o getProperties
 public Properties getProperties()
Get the java.util.Properties (all of them)

Returns:
properties
 o getTitle
 public String getTitle(String key)
Get the title property value associated with the key.

Parameters:
key - key value
Returns:
property value (may be null if property does not exist) Note that both key and value are Strings, not general Objects
See Also:
get
 o isSetup
 public boolean isSetup()
Checks whether the user did the setup atleast once. The report can't be generated before doing the setup atleast once. User can alter the properties of the JVM client, Hardware, e-mail address to send the report during the Setup process.

 o list
 public void list(PrintStream out)
Lists all the properties to the output stream provided

Parameters:
out - Outputput stream.
 o parametersChosen
 public boolean parametersChosen()
 o put
 public void put(String key,
                 String value)
Adds the Key and Hash to the Properties object

Parameters:
key - Key
value - value of the key
 o setup
 public void setup()
Shows the Setup dialog. User can edit the properties.

 o toString
 public String toString()
Overriden toString() method


All Packages  Class Hierarchy  This Package  Previous  Next  Index