|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dtf.testframework.testnode.TaskRunner
public abstract class TaskRunner
Field Summary | |
---|---|
protected TestNodeInterface |
_associatedTestNode
|
protected java.lang.String |
_associatedTestNodeName
|
protected java.lang.String |
_className
|
protected java.lang.String |
_classpathRef
|
protected boolean |
_finished
|
protected java.lang.Object |
_finishedSyncObject
|
protected java.lang.String[] |
_jvmParameters
|
protected TaskResultListener |
_listener
|
protected java.lang.String |
_loggingResource
|
protected LoggingService |
_loggingService
|
protected NodeConfiguration |
_nodeConfig
|
protected java.lang.String[] |
_parameters
|
protected ProductConfiguration |
_productConfig
|
protected boolean |
_ready
|
protected TaskResultListener |
_resultListener
|
protected RunUID |
_runId
|
protected java.util.Hashtable |
_runnerParameters
|
protected boolean |
_running
|
protected ServiceUtils |
_serviceUtils
|
protected TaskIdInterface |
_taskId
|
protected java.lang.Object |
_taskIsRunning
|
protected java.lang.String |
_taskName
|
protected java.lang.String |
_taskPermutationCode
|
protected java.lang.String |
_testId
|
protected java.lang.String |
_testPermutationCode
|
protected int |
_testType
|
protected boolean |
_timedOut
|
protected int |
_timeoutValue
|
static java.lang.String |
JAVA_HOME_DIRECTORY_PARAMETER
|
Constructor Summary | |
---|---|
TaskRunner()
|
Method Summary | |
---|---|
java.lang.String |
getClasspathString()
Get the classpath required to run tasks for the given product |
java.lang.String |
getJavaExe()
Retrieve the configured JAVA executable directory (JAVA_HOME/bin) |
java.lang.String |
getJavaHome()
|
LoggingService |
getLoggingService()
Retrieves the logging service to be used by the task runner to log results. |
NodeConfiguration |
getNodeConfiguration()
|
TaskResultListener |
getResultListener()
Retrieve a reference to the task result listener for this task runner. |
java.util.Hashtable |
getRunnerParameters()
Retrieves a table of name value parameters passed to this task runner by the currently executing test. |
TaskIdInterface |
getRunningTaskId()
Retrieve the task id. |
java.lang.String |
getRunningTaskPermutationCode()
Retrieve the permutation code of the task being run by this task runner. |
java.lang.String |
getRunningTestPermutationCode()
Retrieve the permutation code of the test currently being run. |
ServiceUtils |
getServiceUtils()
Retrieve the service utils used by the framework. |
java.lang.String |
getTaskName()
Get the name of the task being run by this task runner. |
boolean |
hasFinished()
Returns true if the task has finished. |
boolean |
hasTimedOut()
Returns true if the task this task runner is running has timedout. |
void |
indicateTaskIsRunning()
Called by the task runner when it has detected that the task is running. |
void |
initialise(java.util.Hashtable runnerParameters,
java.lang.String testId,
java.lang.String className,
java.lang.String classpathRef,
java.lang.String taskName,
java.lang.String[] parameters,
java.lang.String[] jvmParameters,
int testType,
int timeoutValue,
ProductConfiguration productConfig,
NodeConfiguration nodeConfig,
TaskIdInterface taskId,
TaskResultListener listener,
TestNodeInterface associatedTestNode,
RunUID runId,
java.lang.String taskPermutationCode,
java.lang.String testPermutationCode,
java.lang.String loggingResource,
ServiceUtils serviceUtils)
Called by the framework to initialise this task runner. |
boolean |
isReady()
Returns true if this task has signalled that it is ready. |
protected void |
readySignalled()
This method is called by a task runner when the task it is running has declared that it is ready to be used. |
void |
registerResultListener(TaskResultListener listener)
Registers a task result listener for this task runner. |
void |
run()
|
abstract void |
runTask()
This is the main body of the task runner. |
void |
start()
|
abstract boolean |
terminate()
Called by the framework when it wishes to terminate the task this runner is running. |
java.lang.String |
toString()
|
abstract void |
waitFor()
Called by the framework when it wishes to wait for the task to finish. |
boolean |
waitForFinished()
Called by the framework to wait for the task ro signal that it is finished. |
boolean |
waitForReadyOrFinished()
Called by the framework to wait for the task to signal Ready or finish. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JAVA_HOME_DIRECTORY_PARAMETER
protected java.lang.String _className
protected java.lang.String[] _parameters
protected java.lang.String[] _jvmParameters
protected int _testType
protected int _timeoutValue
protected NodeConfiguration _nodeConfig
protected ProductConfiguration _productConfig
protected TaskResultListener _listener
protected TaskIdInterface _taskId
protected TaskResultListener _resultListener
protected TestNodeInterface _associatedTestNode
protected java.lang.String _associatedTestNodeName
protected java.util.Hashtable _runnerParameters
protected boolean _finished
protected java.lang.Object _finishedSyncObject
protected boolean _ready
protected RunUID _runId
protected java.lang.String _loggingResource
protected java.lang.String _taskPermutationCode
protected java.lang.String _testPermutationCode
protected java.lang.String _testId
protected java.lang.String _taskName
protected boolean _timedOut
protected boolean _running
protected java.lang.Object _taskIsRunning
protected ServiceUtils _serviceUtils
protected LoggingService _loggingService
protected java.lang.String _classpathRef
Constructor Detail |
---|
public TaskRunner()
Method Detail |
---|
public final void initialise(java.util.Hashtable runnerParameters, java.lang.String testId, java.lang.String className, java.lang.String classpathRef, java.lang.String taskName, java.lang.String[] parameters, java.lang.String[] jvmParameters, int testType, int timeoutValue, ProductConfiguration productConfig, NodeConfiguration nodeConfig, TaskIdInterface taskId, TaskResultListener listener, TestNodeInterface associatedTestNode, RunUID runId, java.lang.String taskPermutationCode, java.lang.String testPermutationCode, java.lang.String loggingResource, ServiceUtils serviceUtils) throws java.rmi.RemoteException
runnerParameters
- testId
- className
- taskName
- parameters
- jvmParameters
- testType
- timeoutValue
- productConfig
- nodeConfig
- taskId
- listener
- associatedTestNode
- runId
- taskPermutationCode
- testPermutationCode
- loggingResource
- serviceUtils
-
java.rmi.RemoteException
public final java.util.Hashtable getRunnerParameters()
public final void registerResultListener(TaskResultListener listener)
listener
- A reference to the task result listener.public LoggingService getLoggingService()
public final java.lang.String getTaskName()
public final TaskIdInterface getRunningTaskId()
public final java.lang.String getRunningTestPermutationCode()
public final java.lang.String getRunningTaskPermutationCode()
public final TaskResultListener getResultListener()
public boolean hasTimedOut()
public java.lang.String toString()
toString
in class java.lang.Object
protected final void readySignalled() throws java.rmi.RemoteException
java.rmi.RemoteException
public final void start()
public final boolean waitForReadyOrFinished() throws java.lang.InterruptedException
java.lang.InterruptedException
public final boolean waitForFinished() throws java.lang.InterruptedException
java.lang.InterruptedException
public final boolean hasFinished()
public final boolean isReady() throws java.lang.Exception
java.lang.Exception
- If this task is not expected to have a ready state.public final void run()
run
in interface java.lang.Runnable
public ServiceUtils getServiceUtils()
public final void indicateTaskIsRunning()
public final NodeConfiguration getNodeConfiguration()
public java.lang.String getClasspathString()
public abstract void runTask() throws java.lang.Exception
java.lang.Exception
public abstract boolean terminate()
public abstract void waitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
public final java.lang.String getJavaHome()
public final java.lang.String getJavaExe()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |