JTR 5.0 API Documentation

jtr.script
Class ScriptContext

java.lang.Object
  extended by jtr.script.ScriptContext
All Implemented Interfaces:
java.io.Serializable, IScriptContext

public class ScriptContext
extends java.lang.Object
implements java.io.Serializable, IScriptContext

This class represents the default context accessible from every script via the global.jtrContext keyword. This keyword can be used to invoke all the methods exposed by this class instances.

Since:
5.0
Version:
5.0
Author:
frusso
See Also:
Serialized Form

Constructor Summary
ScriptContext(java.lang.String cat, ParametersMap params, int id, int epoch, int run)
          Costructor.
 
Method Summary
 java.lang.String getCategory()
          Get the runner's category
 int getCurrentEpoch()
          Get the current epoch for the script that has been provided with this context
 int getCurrentRun()
          Get the current run for the script that has been provided with this context
 int getInstanceID()
          Get the runner's unique progessive identifier
 ParametersMap getParameters()
          Get the runner's parameters
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptContext

public ScriptContext(java.lang.String cat,
                     ParametersMap params,
                     int id,
                     int epoch,
                     int run)
Costructor.

Parameters:
cat - The category of the runner instance the script will run for
params - The parameters of the same runner
id - The unique progressive identifier assigned to the above runner instance
epoch - The current epoch
run - The current run
Method Detail

getCurrentEpoch

public int getCurrentEpoch()
Get the current epoch for the script that has been provided with this context

Specified by:
getCurrentEpoch in interface IScriptContext
Returns:

getCurrentRun

public int getCurrentRun()
Get the current run for the script that has been provided with this context

Specified by:
getCurrentRun in interface IScriptContext
Returns:

getCategory

public java.lang.String getCategory()
Get the runner's category

Specified by:
getCategory in interface IScriptContext
Returns:

getInstanceID

public int getInstanceID()
Get the runner's unique progessive identifier

Specified by:
getInstanceID in interface IScriptContext
Returns:

getParameters

public ParametersMap getParameters()
Get the runner's parameters

Specified by:
getParameters in interface IScriptContext
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

The JTR Project is licensed under GPL version 2