JTR 5.0 API Documentation

jtr.runners
Interface IRunnerPooled

All Superinterfaces:
IRunnerClean, IRunnerParameterized, java.lang.Runnable
All Known Subinterfaces:
IRunner, IRunnerJMS, IRunnerWs
All Known Implementing Classes:
AbstractJMSRunner, AbstractRunner, AbstractRunnerAncestor, AbstractWsRunner, JUnitFacadeRunner

public interface IRunnerPooled
extends java.lang.Runnable, IRunnerParameterized

This interface describes a runner in its POOLED state.
Thus the runner is finally elegible for leaving the pool and running according to the provided configuration.

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

Method Summary
 void afterTest()
           
 void beforeTest()
          This optional method must be implemented if the user-defined runner has to prepare one or more resources before executing its testing-logic.
 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.
 void cleanupResources()
          This method has to be implemented by all concrete IRunner implementations for performing resource clean-up operations (closing connections, closing files, etc.).
In the current release of JTR, the framework will start the resource clean-up session only upon completion of the last epoch and once all the IRunners have been put back into the pool.
For an IRunner extending the AbstractJMSRunner abstract class, the injection of all the JMS administered objects and connections will happen only once, before the first run of the first epoch is started.
This is for not wasting both time and resources for gathering always the same resources every time a new run has to be executed.
 RunnerPool getPool()
          Get the pool the current runner belongs to.
 void run()
          This method starts the execution of the runner.
 
Methods inherited from interface jtr.runners.IRunnerParameterized
setPool
 
Methods inherited from interface jtr.runners.IRunnerClean
getCurrentRun, getDefaultName, getEnterprise, getEpoch, getFqn, getInstanceCount, getInstanceID, getName, getOutcomeFactory, getParameters, getParamsAssigner, getRuns, getSleepTime, getStatFunction, getTestOutcomeTable, setCurrentRun, setEnterprise, setEpoch, setFqn, setInstanceCount, setInstanceID, setName, setOutcomeFactory, setParameters, setParamsAssigner, setRuns, setSleepTime, setStatFunction, setTestCompletionListener, setTestOutcomeTable
 

Method Detail

run

void run()
Description copied from interface: IRunnerParameterized
This method starts the execution of the runner.

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

getPool

RunnerPool getPool()
Get the pool the current runner belongs to.

Returns:
RunnerPool

beforeTest

void beforeTest()
                throws java.lang.Throwable
This optional method must be implemented if the user-defined runner has to prepare one or more resources before executing its testing-logic. This method is called before starting each run.

Throws:
java.lang.Throwable

afterTest

void afterTest()
               throws java.lang.Throwable
Throws:
java.lang.Throwable

cleanupResources

void cleanupResources()
This method has to be implemented by all concrete IRunner implementations for performing resource clean-up operations (closing connections, closing files, etc.).
In the current release of JTR, the framework will start the resource clean-up session only upon completion of the last epoch and once all the IRunners have been put back into the pool.
For an IRunner extending the AbstractJMSRunner abstract class, the injection of all the JMS administered objects and connections will happen only once, before the first run of the first epoch is started.
This is for not wasting both time and resources for gathering always the same resources every time a new run has to be executed.

See Also:
AbstractRunnerAncestor.clean()

clean

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