JTR 5.0 API Documentation

jtr.config
Class RunnerConfig

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

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

Instances of this class represent configurations associated with specific IRunner implementation classes.
A RunnerConfig instance typically contains information such as the FQN of the associated IRunner concrete class, the number of instances that have to be created by the JTR framework, and the set of parameters to be assigned to runners at runtime along with the desired assignment policy.

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

Field Summary
static java.lang.String DEFAULT_ASSIGNMENT_POLICY
          Default assignment policy is CYCLIC
static int DEFAULT_COUNT
          Default value for an IRunner number of runs is 1
static int DEFAULT_RUNS
          Default value for an IRunner number of instances is 1
static long DEFAULT_SLEEP_TIME
          Default value for an IRunner sleep time is -1 (undefined)
 
Constructor Summary
RunnerConfig()
          Constructor.
 
Method Summary
 void addParameterSet(ParametersMap runnerParam)
          Adds a new ParametersMap to the set of currently available ParameterMaps
 IAssignmentPolicy getAssignmetPolicy()
          Short-hand method useful to instantiate the concrete IAssignmentPolicy that will handle the parameterization for this runner configuration.
 java.lang.String getBinding()
          Get the default binding associated with the runner.
 int getCount()
          Gets the number of instances that have to be created at runtime
 java.lang.String getEnterprise()
          Returns the default enterprise configuration unique name associated with the current runner configuration.
 java.lang.String getJms()
          Gets the unique id of the JMS configuration to be used by the current runner.
 java.util.List<ParametersMap> getParameterMaps()
          Gets all the configured ParmetersMaps as a Vector<ParametersMap>.
 java.lang.String getParametersAssignmetPolicy()
          Returns the String which identifies the IAssignmentPolicy associated with the current RunnerConfig.
 TestConfig getParent()
          Returns the belonging to TestConfig instance.
 java.lang.String getRunnerFqn()
          Gets the FQN of the runner associated with this RunnerConfig instance.
 int getRuns()
          Sets the default number of times each runner belonging to this runner configuration will have to run.
 long getSleepTime()
          Returns the defautl sleep time for this runner configuration.
 java.lang.String getWebservice()
          Get the unique name of the webservice configuration this runner configuration points to.
 void setBinding(java.lang.String binding)
          Set the default binding associated with the runner.
 void setCount(int count)
          Sets the number of instances that have to be created at runtime
 void setEnterprise(java.lang.String enterprise)
          Sets the default enterprise configuration unique name associated with the current runner configuration.
 void setJms(java.lang.String id)
          Sets the unique id of the JMS configuration to be used by the current runner.
 void setParametersAssignmetPolicy(java.lang.String parametersAssignmetPolicy)
          Sets the String which identifies the IAssignmentPolicy associated with the current RunnerConfig.
 void setParent(TestConfig parent)
          Ties the current runner configuration to the TestConfig it belongs to.
 void setRunnerFqn(java.lang.String runnerFqn)
          Sets the FQN of the runner associated with this RunnerConfig instance.
 void setRuns(int runs)
          Gets the default number of times each runner belonging to this runner configuration will have to run.
 void setSleepTime(long sleepTime)
          Sets the default sleep time for this runner configuration.
 void setWebservice(java.lang.String webservice)
          Set the reference to the webservice configuration this runner configuration points to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SLEEP_TIME

public static final long DEFAULT_SLEEP_TIME
Default value for an IRunner sleep time is -1 (undefined)

See Also:
Constant Field Values

DEFAULT_RUNS

public static final int DEFAULT_RUNS
Default value for an IRunner number of instances is 1

See Also:
Constant Field Values

DEFAULT_COUNT

public static final int DEFAULT_COUNT
Default value for an IRunner number of runs is 1

See Also:
Constant Field Values

DEFAULT_ASSIGNMENT_POLICY

public static final java.lang.String DEFAULT_ASSIGNMENT_POLICY
Default assignment policy is CYCLIC

See Also:
Constant Field Values
Constructor Detail

RunnerConfig

public RunnerConfig()
Constructor.

Method Detail

getRunnerFqn

public java.lang.String getRunnerFqn()
Gets the FQN of the runner associated with this RunnerConfig instance.

Returns:
String

setRunnerFqn

public void setRunnerFqn(java.lang.String runnerFqn)
Sets the FQN of the runner associated with this RunnerConfig instance.

Parameters:
runnerFqn - String

getCount

public int getCount()
Gets the number of instances that have to be created at runtime

Returns:
int

setCount

public void setCount(int count)
Sets the number of instances that have to be created at runtime

Parameters:
count - int

addParameterSet

public void addParameterSet(ParametersMap runnerParam)
Adds a new ParametersMap to the set of currently available ParameterMaps

Parameters:
runnerParam - ParametersMap

getParameterMaps

public java.util.List<ParametersMap> getParameterMaps()
Gets all the configured ParmetersMaps as a Vector<ParametersMap>.

Returns:
Vector

getParametersAssignmetPolicy

public java.lang.String getParametersAssignmetPolicy()
Returns the String which identifies the IAssignmentPolicy associated with the current RunnerConfig.

Returns:
String

getAssignmetPolicy

public IAssignmentPolicy getAssignmetPolicy()
                                     throws UnknownAssignmentPolicyException
Short-hand method useful to instantiate the concrete IAssignmentPolicy that will handle the parameterization for this runner configuration.

Returns:
IAssignmentPolicy
Throws:
UnknownAssignmentPolicyException

setParametersAssignmetPolicy

public void setParametersAssignmetPolicy(java.lang.String parametersAssignmetPolicy)
Sets the String which identifies the IAssignmentPolicy associated with the current RunnerConfig.

Parameters:
parametersAssignmetPolicy - String

getSleepTime

public long getSleepTime()
Returns the defautl sleep time for this runner configuration.

Returns:
long

setSleepTime

public void setSleepTime(long sleepTime)
Sets the default sleep time for this runner configuration.

Parameters:
sleepTime - long

getRuns

public int getRuns()
Sets the default number of times each runner belonging to this runner configuration will have to run.

Returns:
int

setRuns

public void setRuns(int runs)
Gets the default number of times each runner belonging to this runner configuration will have to run.

Parameters:
runs - int

getEnterprise

public java.lang.String getEnterprise()
Returns the default enterprise configuration unique name associated with the current runner configuration.

Returns:
String

setEnterprise

public void setEnterprise(java.lang.String enterprise)
Sets the default enterprise configuration unique name associated with the current runner configuration.

Parameters:
enterprise - String

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

setParent

public void setParent(TestConfig parent)
Ties the current runner configuration to the TestConfig it belongs to.

Parameters:
parent - TestConfig

setWebservice

public void setWebservice(java.lang.String webservice)
Set the reference to the webservice configuration this runner configuration points to.

Parameters:
webservice - The webservice configuration unique name

getWebservice

public java.lang.String getWebservice()
Get the unique name of the webservice configuration this runner configuration points to.

Returns:
String The webservice configuration unique name

setBinding

public void setBinding(java.lang.String binding)
Set the default binding associated with the runner.

Parameters:
binding - The webservice binding unique name

getBinding

public java.lang.String getBinding()
Get the default binding associated with the runner.

Returns:
String The webservice binding unique name

getParent

public TestConfig getParent()
Returns the belonging to TestConfig instance.

Returns:
TestConfig

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