jgroup.relacs.config
Class ExperimentConfig

java.lang.Object
  extended by jgroup.relacs.config.ExperimentConfig
All Implemented Interfaces:
jgroup.relacs.config.ConfigurationObject

public class ExperimentConfig
extends java.lang.Object
implements jgroup.relacs.config.ConfigurationObject

The ExperimentConfig object contains the configuration for the DaemonExperiment application.

Author:
Bjarte Svaeren, Hein Meling

Constructor Summary
ExperimentConfig()
          Constructs an empty ExperimentConfig.
 
Method Summary
 java.lang.String ant(java.lang.String target)
           
 java.lang.String ant(java.lang.String target, java.lang.String[] expProperties, Runnable runnable)
           
 boolean getBooleanProperty(Runnable runnable, java.lang.String name)
          Returns a property assosciated with a Runnable object as a boolean.
 boolean getBooleanProperty(Runnable runnable, java.lang.String name, boolean defaultValue)
          Returns a property assosciated with a Runnable object as a boolean.
 boolean getBooleanProperty(java.lang.String name)
          Returns a 'global' property as a boolean.
 jgroup.relacs.config.ClientsConfig getClientConfig()
           
 java.lang.String getExperimentName()
           
 java.util.List getExperimentRunList()
           
 int getIntProperty(Runnable runnable, java.lang.String name)
          Returns a property assosciated with a Runnable object as an int.
 int getIntProperty(Runnable runnable, java.lang.String name, int defaultValue)
          Returns a property assosciated with a Runnable object as an int, and returns the specified default value if the property has not been set.
 int getIntProperty(java.lang.String name)
          Returns a 'global' property as an int.
 int getIntProperty(java.lang.String name, int defaultValue)
          Returns a 'global' property as an int, and returns the specified default value if the property has not been set.
 java.util.List getPostExperimentRunList()
           
 java.util.List getPreExperimentRunList()
           
 java.util.Map getProperties()
           
 java.util.Map getProperties(Runnable runnable)
          Returns the map of sysproperties associated with the given Runnable object.
 java.lang.String getProperty(Runnable runnable, java.lang.String name)
          Returns a property assosciated with a Runnable object.
 java.lang.String getProperty(Runnable runnable, java.lang.String name, java.lang.String defaultValue)
          Returns a property assosciated with a Runnable object.
 java.lang.String getProperty(java.lang.String name)
          Returns a global property.
 java.lang.String getProperty(java.lang.String name, java.lang.String defaultVal)
          Returns a global property or the given default value if no such property was defined.
 java.lang.String getRepeatScript()
           
 jgroup.relacs.config.DistributedSystemConfig getServerConfig()
           
 void parse(org.w3c.dom.Element elm)
          Parses the specified element.
 java.lang.String scp(java.lang.String fromHost, java.lang.String fromDir, java.lang.String toDir)
           
 void set(java.lang.String key, java.lang.Object val)
          Update the internal properties map with the given key value associatation.
 java.lang.String ssh(java.lang.String hostname)
           
 void updateProperties(Runnable runnable)
          Update the properties of the associated runnable object to reflect any changes in the global properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentConfig

public ExperimentConfig()
Constructs an empty ExperimentConfig.

Method Detail

parse

public void parse(org.w3c.dom.Element elm)
           throws jgroup.core.ConfigurationException
Parses the specified element.

Specified by:
parse in interface jgroup.relacs.config.ConfigurationObject
Throws:
jgroup.core.ConfigurationException
See Also:
ConfigurationObject.parse(org.w3c.dom.Element)

updateProperties

public void updateProperties(Runnable runnable)
                      throws jgroup.core.ConfigurationException
Update the properties of the associated runnable object to reflect any changes in the global properties.

Throws:
jgroup.core.ConfigurationException

set

public void set(java.lang.String key,
                java.lang.Object val)
Update the internal properties map with the given key value associatation. This method is meant to be used from external beanshell scripts.


getServerConfig

public jgroup.relacs.config.DistributedSystemConfig getServerConfig()

getClientConfig

public jgroup.relacs.config.ClientsConfig getClientConfig()

getExperimentName

public java.lang.String getExperimentName()

getPreExperimentRunList

public java.util.List getPreExperimentRunList()

getExperimentRunList

public java.util.List getExperimentRunList()

getPostExperimentRunList

public java.util.List getPostExperimentRunList()

getRepeatScript

public java.lang.String getRepeatScript()

getProperties

public java.util.Map getProperties()

getProperties

public java.util.Map getProperties(Runnable runnable)
Returns the map of sysproperties associated with the given Runnable object.

Parameters:
runnable -
Returns:

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws java.util.NoSuchElementException
Returns a global property.

Parameters:
name -
Returns:
Throws:
java.util.NoSuchElementException

getProperty

public java.lang.String getProperty(java.lang.String name,
                                    java.lang.String defaultVal)
Returns a global property or the given default value if no such property was defined.


getIntProperty

public int getIntProperty(java.lang.String name)
Returns a 'global' property as an int.

Parameters:
name -
Returns:

getIntProperty

public int getIntProperty(java.lang.String name,
                          int defaultValue)
Returns a 'global' property as an int, and returns the specified default value if the property has not been set.

Parameters:
name -
defaultValue -
Returns:

getBooleanProperty

public boolean getBooleanProperty(java.lang.String name)
Returns a 'global' property as a boolean. If the property has not been set, false is returned.

Parameters:
name -
Returns:

getProperty

public java.lang.String getProperty(Runnable runnable,
                                    java.lang.String name)
                             throws java.util.NoSuchElementException
Returns a property assosciated with a Runnable object.

Parameters:
runnable -
name -
Returns:
Throws:
java.util.NoSuchElementException

getProperty

public java.lang.String getProperty(Runnable runnable,
                                    java.lang.String name,
                                    java.lang.String defaultValue)
Returns a property assosciated with a Runnable object.

Parameters:
runnable -
name -
defaultValue -
Returns:

getIntProperty

public int getIntProperty(Runnable runnable,
                          java.lang.String name)
Returns a property assosciated with a Runnable object as an int.

Parameters:
runnable -
name -
Returns:

getIntProperty

public int getIntProperty(Runnable runnable,
                          java.lang.String name,
                          int defaultValue)
Returns a property assosciated with a Runnable object as an int, and returns the specified default value if the property has not been set.

Parameters:
runnable -
name -
defaultValue -
Returns:

getBooleanProperty

public boolean getBooleanProperty(Runnable runnable,
                                  java.lang.String name)
Returns a property assosciated with a Runnable object as a boolean. If the property has not been set, false is returned.

Parameters:
runnable -
name -
Returns:

getBooleanProperty

public boolean getBooleanProperty(Runnable runnable,
                                  java.lang.String name,
                                  boolean defaultValue)
Returns a property assosciated with a Runnable object as a boolean. If the property has not been set, the default is returned.

Parameters:
runnable -
name -
defaultValue -
Returns:

ssh

public java.lang.String ssh(java.lang.String hostname)

scp

public java.lang.String scp(java.lang.String fromHost,
                            java.lang.String fromDir,
                            java.lang.String toDir)

ant

public java.lang.String ant(java.lang.String target,
                            java.lang.String[] expProperties,
                            Runnable runnable)

ant

public java.lang.String ant(java.lang.String target)


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.