JTR 5.0 API Documentation

jtr.assigner.impl
Class CyclicParamsAssigner

java.lang.Object
  extended by jtr.assigner.impl.AbstractParamsAssigner
      extended by jtr.assigner.impl.CyclicParamsAssigner
All Implemented Interfaces:
IParamsAssigner

public class CyclicParamsAssigner
extends AbstractParamsAssigner

This class is a concrete IParamsAssigner implementation providing a cyclic parameters assignment policy.
This means that should a configured runner have multiple parameters-sets associated with it, this particular assigner would iterate over all the available parameters-set and assign them to the runner following the order in which they compare in the jtr.xml configuration file. Each assignment will be performed at the beginning of each run.
The number of runs has priority over the number of configured parameters-sets.

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

Constructor Summary
CyclicParamsAssigner()
          Default constructor.
 
Method Summary
protected  boolean _requiresReinitialization()
          This method always returns true.
 IRunnerParameterized[] assign(IRunnerClean[] cRunners, RunnerConfig runnerConfig)
          Assing to the provided cRunners the parameters defined in the first parameter-set obtainable from the given runnerConfig.
 IRunnerParameterized backToFirstAssignment(IRunnerClean cRunner)
          Brings the provided runner back to its first state.
 IRunnerParameterized reAssign(IRunnerClean cRunner)
          Perform every assignment subsequent to the first one using the RunnerConfig provided to the assign method.
 
Methods inherited from class jtr.assigner.impl.AbstractParamsAssigner
assignEnterpriseCfg, assignJmsCfg, assignParameter, assignRuns, assignSleepTime, assignWebservice, assingBinding, handleUserDefinedParameters, isReinitializationForced, performStdAssignment, readStdParameters, requiresReinitialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CyclicParamsAssigner

public CyclicParamsAssigner()
Default constructor.

Method Detail

assign

public IRunnerParameterized[] assign(IRunnerClean[] cRunners,
                                     RunnerConfig runnerConfig)
Assing to the provided cRunners the parameters defined in the first parameter-set obtainable from the given runnerConfig.

Parameters:
cRunners - IRunnerClean[] Set of IRunnerClean instances belonging to the same class.
runnerConfig - RunnerConfig Configuration for the above runners
Returns:
IRunnerParameterized[] The set of input runners transitioned to the PARAMETERIZED state

_requiresReinitialization

protected boolean _requiresReinitialization()
This method always returns true.

Specified by:
_requiresReinitialization in class AbstractParamsAssigner
Returns:
boolean

reAssign

public IRunnerParameterized reAssign(IRunnerClean cRunner)
Perform every assignment subsequent to the first one using the RunnerConfig provided to the assign method.

Parameters:
cRunner - IRunnerClean The runner to be parameterized in its CLEAN state
Returns:
IRunnerParameterized The runner in its PARAMETERIZED state

backToFirstAssignment

public IRunnerParameterized backToFirstAssignment(IRunnerClean cRunner)
Brings the provided runner back to its first state.

Parameters:
cRunner - IRunnerClean The runner in its CLEAN state
Returns:
IRunnerParameterized The runner in its PARAMETERIZED state

The JTR Project is licensed under GPL version 2