JTR 5.0 API Documentation

jtr.assigner.impl
Class AbstractParamsAssigner

java.lang.Object
  extended by jtr.assigner.impl.AbstractParamsAssigner
All Implemented Interfaces:
IParamsAssigner
Direct Known Subclasses:
CyclicParamsAssigner, IndexedParamsAssigner

public abstract class AbstractParamsAssigner
extends java.lang.Object
implements IParamsAssigner

This class is the base class for all the concrete IParamsAssigner implementations. It provides all the basic methods necessary for injecting the configuration parameters that can be found in the jtr.xml configuration file into the concrete IRunner implementation.

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

Constructor Summary
AbstractParamsAssigner()
           
 
Method Summary
protected abstract  boolean _requiresReinitialization()
          This method must be implemented by concrete subclasses to tell the JTR-runtime if the runner mnaged be the assigner requires to be reinitialized upon each run completion.
protected  void assignEnterpriseCfg(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the ENTERPRISE configuration to be assigned to the provided runner implementation using StdParameters.ENTERPRISE as a key.
protected  void assignJmsCfg(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the JMS configuration to be assigned to the provided runner implementation using StdParameters.JMS as a key.
protected  void assignParameter(IRunnerClean cRunner, RunnerConfigParam param, java.lang.Object val)
          This method allows the assignment of the provided val instance to the param property of the specified cRunner instance.
protected  void assignRuns(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the RUNS value to be assigned to the provided runner implementation using StdParameters.RUN as a key.
protected  void assignSleepTime(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the SLEEP_TIME value to be assigned to the provided runner implementation using StdParameters.SLEEP_TIME as a key.
protected  void assignWebservice(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the WEBSERVICE configuration to be assigned to the provided runner implementation using StdParameters.WEBSERVICE as a key.
protected  void assingBinding(java.util.HashMap map, RunnerConfig runnerConfig, ParametersMap params)
          This method loads into the provided map the BINDING configuration to be assigned to the provided runner implementation using StdParameters.BINDING as a key.
protected  void handleUserDefinedParameters(IRunnerClean cRunner, RunnerConfig runnerConfig, ParametersMap params)
          This method routes the initialization of the different families of supported parameters other than the standard ones.
 boolean isReinitializationForced()
          Tells whether runner reinitialization has been forced by the JTR-runtime.
protected  void performStdAssignment(IRunnerClean cRunner, RunnerConfig runnerConfig, ParametersMap params, IParamsAssigner caller)
          This method assigns to the input IRunnerClean instance all its configuration parameters specified in the jtr.xml file.
These parameters are stored into the runnerConfig and params input parameters.
 java.util.HashMap readStdParameters(RunnerConfig runnerConfig, ParametersMap params)
          This method reads all the JTR standard parameters and puts them all into an HashMap.
The keys used within this HashMap are those specified as constant fields into the StdParameters class.
 boolean requiresReinitialization()
          Tells whether the runner managed by this assigner required reinitialization or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jtr.assigner.IParamsAssigner
assign, backToFirstAssignment, reAssign
 

Constructor Detail

AbstractParamsAssigner

public AbstractParamsAssigner()
Method Detail

performStdAssignment

protected final void performStdAssignment(IRunnerClean cRunner,
                                          RunnerConfig runnerConfig,
                                          ParametersMap params,
                                          IParamsAssigner caller)
This method assigns to the input IRunnerClean instance all its configuration parameters specified in the jtr.xml file.
These parameters are stored into the runnerConfig and params input parameters.

Parameters:
cRunner - IRunnerClean
runnerConfig - RunnerConfig
params - ParametersMap
caller - IParamsAssigner

handleUserDefinedParameters

protected final void handleUserDefinedParameters(IRunnerClean cRunner,
                                                 RunnerConfig runnerConfig,
                                                 ParametersMap params)
This method routes the initialization of the different families of supported parameters other than the standard ones. The current set parameters families foresees:
  • deault parameters
  • scripted parameters
  • statiscial parameters
  • user-defined parameters
  • Parameters:
    cRunner -
    runnerConfig -
    params -

    assignParameter

    protected void assignParameter(IRunnerClean cRunner,
                                   RunnerConfigParam param,
                                   java.lang.Object val)
    This method allows the assignment of the provided val instance to the param property of the specified cRunner instance.

    Parameters:
    cRunner -
    param -
    val -

    _requiresReinitialization

    protected abstract boolean _requiresReinitialization()
    This method must be implemented by concrete subclasses to tell the JTR-runtime if the runner mnaged be the assigner requires to be reinitialized upon each run completion.

    Returns:

    isReinitializationForced

    public final boolean isReinitializationForced()
    Tells whether runner reinitialization has been forced by the JTR-runtime.

    Specified by:
    isReinitializationForced in interface IParamsAssigner
    Returns:

    requiresReinitialization

    public final boolean requiresReinitialization()
    Tells whether the runner managed by this assigner required reinitialization or not.

    Specified by:
    requiresReinitialization in interface IParamsAssigner
    Returns:

    readStdParameters

    public final java.util.HashMap readStdParameters(RunnerConfig runnerConfig,
                                                     ParametersMap params)
                                              throws MissingStdParameterException
    This method reads all the JTR standard parameters and puts them all into an HashMap.
    The keys used within this HashMap are those specified as constant fields into the StdParameters class.

    Parameters:
    runnerConfig - RunnerConfig
    params - ParametersMap
    Returns:
    HashMap
    Throws:
    MissingStdParameterException
    See Also:
    StdParameters

    assingBinding

    protected final void assingBinding(java.util.HashMap map,
                                       RunnerConfig runnerConfig,
                                       ParametersMap params)
                                throws MissingStdParameterException
    This method loads into the provided map the BINDING configuration to be assigned to the provided runner implementation using StdParameters.BINDING as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap
    Throws:
    MissingStdParameterException

    assignWebservice

    protected final void assignWebservice(java.util.HashMap map,
                                          RunnerConfig runnerConfig,
                                          ParametersMap params)
                                   throws MissingStdParameterException
    This method loads into the provided map the WEBSERVICE configuration to be assigned to the provided runner implementation using StdParameters.WEBSERVICE as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap
    Throws:
    MissingStdParameterException

    assignSleepTime

    protected final void assignSleepTime(java.util.HashMap map,
                                         RunnerConfig runnerConfig,
                                         ParametersMap params)
                                  throws MissingStdParameterException
    This method loads into the provided map the SLEEP_TIME value to be assigned to the provided runner implementation using StdParameters.SLEEP_TIME as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap
    Throws:
    MissingStdParameterException

    assignRuns

    protected final void assignRuns(java.util.HashMap map,
                                    RunnerConfig runnerConfig,
                                    ParametersMap params)
    This method loads into the provided map the RUNS value to be assigned to the provided runner implementation using StdParameters.RUN as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap

    assignEnterpriseCfg

    protected final void assignEnterpriseCfg(java.util.HashMap map,
                                             RunnerConfig runnerConfig,
                                             ParametersMap params)
                                      throws MissingStdParameterException
    This method loads into the provided map the ENTERPRISE configuration to be assigned to the provided runner implementation using StdParameters.ENTERPRISE as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap
    Throws:
    MissingStdParameterException

    assignJmsCfg

    protected final void assignJmsCfg(java.util.HashMap map,
                                      RunnerConfig runnerConfig,
                                      ParametersMap params)
                               throws MissingStdParameterException
    This method loads into the provided map the JMS configuration to be assigned to the provided runner implementation using StdParameters.JMS as a key.

    Parameters:
    map - HashMap
    runnerConfig - RunnerConfig
    params - ParametersMap
    Throws:
    MissingStdParameterException

    The JTR Project is licensed under GPL version 2