JTR 4.0 API Documentation

jtr.runners
Class AbstractJMSRunner

java.lang.Object
  extended by jtr.runners.AbstractRunnerAncestor
      extended by jtr.runners.AbstractJMSRunner
All Implemented Interfaces:
java.lang.Runnable, IRunner, IRunnerClean, IRunnerJMS, IRunnerParameterized, IRunnerPooled

public abstract class AbstractJMSRunner
extends AbstractRunnerAncestor
implements IRunnerJMS

This abstract runner has to be the base class of all the application-level runners willing to leverage on the JTR runtime for the dynamic injection of JMS administered objects defined in the jtr.xml configuration file.

Since:
1.1
Version:
4.0
Author:
Francesco Russo (frusso@dev.java.net)

Field Summary
 
Fields inherited from class jtr.runners.AbstractRunnerAncestor
epoch, logger, paramsAssigner, pool
 
Constructor Summary
AbstractJMSRunner()
           
 
Method Summary
 IRunnerClean clean()
          This method is invoked everytime an IRunner passes from its RUNNING state to the REQUIRES_NEW_PARAMETERS state.
The concrete IRunner implementation is responsible for its own clean-up.
 int getCurrentRun()
          Return the current run assigned to the IRunner
 JMSConfig getJmsConfig()
          Get the JMS configuration assigned to the current IRunner
 void run()
          This method wraps the test() method implemented by application developed runners.
It manages the execution of the test() method according to the sleep time interval associated with the wrapped IRunner instance, according to the declared number of required runs and so on.
Furthermore there is a fundamental exception accounting feature which enables JTR to collect information about each single IRunner run and the handling of boring/complex tasks such as the reinitialization of each runner parameters according to the associated IAssignmentPolicy.
 void setJmsConfig(JMSConfig jmsConfig)
          Set the JMS configuration assigned to the current IRunner
 
Methods inherited from class jtr.runners.AbstractRunnerAncestor
clean, doRunTest, enrichOutcome, getDefaultName, getEnterprise, getEpoch, getFailures, getInstanceCount, getName, getOutcomeFactory, getParameters, getParamsAssigner, getPool, getRuns, getSleepTime, getSuccesses, getTestOutcomeTable, handleFailure, initializeTimers, setEnterprise, setEpoch, setInstanceCount, setName, setOutcomeFactory, setParameters, setParamsAssigner, setPool, setRuns, setSleepTime, setTestCompletionListener, setTestOutcomeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jtr.runners.IRunner
getFailures, getSuccesses, receiveFailureNotification, test
 
Methods inherited from interface jtr.runners.IRunnerPooled
cleanupResources, getEpoch, getPool, setEpoch
 
Methods inherited from interface jtr.runners.IRunnerParameterized
setPool
 
Methods inherited from interface jtr.runners.IRunnerClean
getDefaultName, getEnterprise, getInstanceCount, getName, getOutcomeFactory, getParameters, getParamsAssigner, getRuns, getSleepTime, getTestOutcomeTable, setEnterprise, setInstanceCount, setName, setOutcomeFactory, setParameters, setParamsAssigner, setRuns, setSleepTime, setTestCompletionListener, setTestOutcomeTable
 

Constructor Detail

AbstractJMSRunner

public AbstractJMSRunner()
Method Detail

setJmsConfig

public void setJmsConfig(JMSConfig jmsConfig)
Set the JMS configuration assigned to the current IRunner

Specified by:
setJmsConfig in interface IRunnerJMS
Parameters:
jmsConfig - The JMS configuration

getJmsConfig

public JMSConfig getJmsConfig()
Get the JMS configuration assigned to the current IRunner

Specified by:
getJmsConfig in interface IRunnerJMS
Returns:
JMSConfig

run

public final void run()
This method wraps the test() method implemented by application developed runners.
It manages the execution of the test() method according to the sleep time interval associated with the wrapped IRunner instance, according to the declared number of required runs and so on.
Furthermore there is a fundamental exception accounting feature which enables JTR to collect information about each single IRunner run and the handling of boring/complex tasks such as the reinitialization of each runner parameters according to the associated IAssignmentPolicy.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface IRunnerParameterized
Specified by:
run in interface IRunnerPooled
See Also:
Runnable.run()

getCurrentRun

public int getCurrentRun()
Return the current run assigned to the IRunner

Specified by:
getCurrentRun in interface IRunner
Returns:
int The current run

clean

public IRunnerClean clean()
This method is invoked everytime an IRunner passes from its RUNNING state to the REQUIRES_NEW_PARAMETERS state.
The concrete IRunner implementation is responsible for its own clean-up.

Returns:
IRunnerClean

The JTR Project is licensed under GPL version 2