JTR 5.0 API Documentation

jtr.config
Class TestConfig

java.lang.Object
  extended by jtr.config.TestConfig
All Implemented Interfaces:
java.io.Serializable

public class TestConfig
extends java.lang.Object
implements java.io.Serializable

This class represents in an object oriented way the jtr.xml configuration file's content, thus contains all the information related to a JTR test configuration.

Since:
1.0
Version:
5.0
Author:
Francesco Russo (frusso@dev.java.net)
See Also:
Serialized Form

Constructor Summary
TestConfig()
          Constructor.
 
Method Summary
 void addEnterprise(EnterpriseConfig enterprise)
          Adds an EnterpriseConfig configuration element to the current JTR test configuration.
 void addJmsConfig(JMSConfig jmsc)
          Add a JMS configuration to the current jtr-test configuration.
 void addRunner(RunnerConfig runner)
          This method adds an IRunner runtime configuration to the current JTR test configuration.
 void addWebService(WebServiceConfig ws)
           
 java.lang.String getBinding()
          Get the default webservice binding.
 Bindings getBindings()
          Get the bindings available to invokers.
 java.lang.String getEnterprise()
          Returns the default enterprise configuration for the current JTR test.
 EnterpriseConfig getEnterprise(java.lang.String uniqueName)
          Gets an EnterpriseConfig configuration element from the current JTR test configuration.
 int getEpochs()
          Returns the total number of epochs set for the JTR test.
 Factories getFactories()
           
 java.lang.String getJms()
          Gets the unique id of the JMS configuration to be used by the current runner.
 JMSConfig getJmsConfig(java.lang.String key)
          Retrieves the JMS configuration associated with the given key (its unique id).
 java.util.Collection getJmsConfigs()
          Returns all the configured JMS configurations.
 Nodes getNodes()
           
 int getOverallRuns()
          This method returns the total number of runs that must be accomplished in a single epoch, according to what has been declared in the jtr.xml configuration file.
 java.util.Vector<RunnerConfig> getRunners()
          Returns a Vector<RunnerConfig>.
 Scripts getScripts()
          Get the object-oriented representation of the scripts section taken from the jtr.xml file.
 java.lang.String getWebservice()
          Get the webservice configuration unique name.
 WebServiceConfig getWebserviceConfig(java.lang.String key)
          Get the currently configured webservice configuration.
 void setBinding(java.lang.String binding)
          Set the default webservice binding.
 void setBindings(Bindings bindings)
          Set the bindings available to invokers.
 void setEnterprise(java.lang.String enterprise)
          Sets the default enterprise configuration for the current JTR test.
 void setEpochs(int epochs)
          Sets the total number of epochs (aka epochs) this test will consist of.
 void setFactories(Factories f)
           
 void setJms(java.lang.String id)
          Sets the unique id of the JMS configuration to be used by the current runner.
 void setNodes(Nodes n)
           
 void setScripts(Scripts val)
          Set the object-oriented representation of the scripts section taken from the jtr.xml file.
 void setWebservice(java.lang.String ws)
          Set the webservice configuration unique name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestConfig

public TestConfig()
Constructor.

Method Detail

setFactories

public void setFactories(Factories f)

getFactories

public Factories getFactories()

setNodes

public void setNodes(Nodes n)

getNodes

public Nodes getNodes()

addWebService

public void addWebService(WebServiceConfig ws)
Parameters:
ws -

addRunner

public void addRunner(RunnerConfig runner)
This method adds an IRunner runtime configuration to the current JTR test configuration.

Parameters:
runner - RunnerConfig One of the multiple IRunner configurations

getRunners

public java.util.Vector<RunnerConfig> getRunners()
Returns a Vector<RunnerConfig>.

Returns:
Vector All the available RunnerConfigs

addEnterprise

public void addEnterprise(EnterpriseConfig enterprise)
Adds an EnterpriseConfig configuration element to the current JTR test configuration.

Parameters:
enterprise - EnterpriseConfig The enterprise configuration

getEnterprise

public EnterpriseConfig getEnterprise(java.lang.String uniqueName)
Gets an EnterpriseConfig configuration element from the current JTR test configuration. The enterprise configuration is uniquely identified by its unique name.

Parameters:
uniqueName -
Returns:
enterprise EnterpriseConfig The enterprise configuration

getEpochs

public int getEpochs()
Returns the total number of epochs set for the JTR test.

Returns:
int The toal number of epochs

setEpochs

public void setEpochs(int epochs)
Sets the total number of epochs (aka epochs) this test will consist of.

Parameters:
epochs - The number of epochs to be executed

getOverallRuns

public int getOverallRuns()
This method returns the total number of runs that must be accomplished in a single epoch, according to what has been declared in the jtr.xml configuration file.

Returns:
The overall amount of epochs

setEnterprise

public void setEnterprise(java.lang.String enterprise)
Sets the default enterprise configuration for the current JTR test. The enterprise configuration is uniquely identified by its unique name.

Parameters:
enterprise - String The default enterprise configuration's unique name

getEnterprise

public java.lang.String getEnterprise()
Returns the default enterprise configuration for the current JTR test. The enterprise configuration is uniquely identified by its unique name.

Returns:
String The default enterprise configuration's unique name

setJms

public void setJms(java.lang.String id)
Sets the unique id of the JMS configuration to be used by the current runner.

Parameters:
id - The JMS unique id

getJms

public java.lang.String getJms()
Gets the unique id of the JMS configuration to be used by the current runner.

Returns:
String

setBinding

public void setBinding(java.lang.String binding)
Set the default webservice binding.

Parameters:
binding - The default webservice binding

getBinding

public java.lang.String getBinding()
Get the default webservice binding.

Returns:
String The default webservice binding

setBindings

public void setBindings(Bindings bindings)
Set the bindings available to invokers.

Parameters:
bindings - The binings

getBindings

public Bindings getBindings()
Get the bindings available to invokers.

Returns:
bindings The binings

setWebservice

public void setWebservice(java.lang.String ws)
Set the webservice configuration unique name.

Parameters:
ws - The webservice configuration unique name

getWebservice

public java.lang.String getWebservice()
Get the webservice configuration unique name.

Returns:
String

addJmsConfig

public void addJmsConfig(JMSConfig jmsc)
Add a JMS configuration to the current jtr-test configuration.

Parameters:
jmsc - The JMS configuration

getJmsConfig

public JMSConfig getJmsConfig(java.lang.String key)
Retrieves the JMS configuration associated with the given key (its unique id).

Parameters:
key - The JMS configuration unique id
Returns:
The JMS configuration

getJmsConfigs

public java.util.Collection getJmsConfigs()
Returns all the configured JMS configurations.

Returns:
The JMS configurations

getWebserviceConfig

public WebServiceConfig getWebserviceConfig(java.lang.String key)
Get the currently configured webservice configuration.

Parameters:
key - The webservice configuration unique key
Returns:
WebServiceConfig

setScripts

public void setScripts(Scripts val)
Set the object-oriented representation of the scripts section taken from the jtr.xml file.

Parameters:
val -

getScripts

public Scripts getScripts()
Get the object-oriented representation of the scripts section taken from the jtr.xml file.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

The JTR Project is licensed under GPL version 2