|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.jboss.dtf.testframework.testnode.TestNode
public class TestNode
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Fields inherited from interface org.jboss.dtf.testframework.testnode.TestNodeInterface |
---|
RESULT_READY, RESULT_TIMEOUT, WAIT_NONE, WAIT_READY |
Constructor Summary | |
---|---|
TestNode(java.net.URL configFile,
java.lang.String nameServiceURI,
java.lang.String nodeName)
|
Method Summary | |
---|---|
void |
dumpActiveTaskList()
|
TaskId |
generateNewTaskId(java.lang.String taskName)
|
TaskIdInterface |
generateTaskId(java.lang.String taskName)
Generates a default task id. |
java.lang.String[] |
getActiveTaskList()
THis method returns the list of tasks currently being run by this node. |
RemoteFileReaderInterface |
getDeployLogOutput(java.lang.String productName,
boolean outOrErr)
This method retrieves an InputStream for the log output for a deployment. |
java.lang.String |
getHostAddress()
|
java.lang.String |
getName()
Get the Name of the TestNode (specified in the XML configuration for that test node). |
TestNodeDescription |
getNodeDescription()
This methods returns the description of this test node. |
static java.lang.String |
getOSId()
|
void |
initialise(java.lang.String collatorIp,
int collatorPort)
|
static void |
initialiseRegistry()
|
void |
initiateTest(java.lang.String currentTestId,
TaskIdInterface taskId)
|
static void |
main(java.lang.String[] args)
|
int |
performTask(java.lang.String taskType,
java.util.Hashtable runnerParameters,
java.lang.String className,
java.lang.String classpathRef,
java.lang.String taskName,
java.lang.String[] parameters,
java.lang.String[] jvmParameters,
java.lang.String product,
int timeoutValue,
TaskIdInterface taskId,
RunUID runId,
java.lang.String taskPermutationCode,
java.lang.String testPermutationCode)
Instructs the TestNode to run a given Java class. |
boolean |
ping()
This method is called by the service register to ensure this test node is responding. |
void |
runTask(java.lang.String taskType,
java.util.Hashtable runnerParameters,
java.lang.String className,
java.lang.String classpathRef,
java.lang.String taskName,
java.lang.String[] parameters,
java.lang.String[] jvmParameters,
java.lang.String product,
int testType,
int timeoutValue,
TaskResultListener listener,
TaskIdInterface taskId,
RunUID runId,
java.lang.String taskPermutationCode,
java.lang.String testPermutationCode)
Instructs the TestNode to run a given Java class and report back using the listener any information returned by the task. |
void |
shutdown(boolean restart,
boolean onComplete)
Instructs the TestNode to deregister with the ServiceRegister and shutdown |
void |
taskFinished(TaskIdInterface taskId,
TestNodeInterface testNode,
java.lang.String testPermutation,
boolean taskStartedSuccessfully)
This method is invoked when the task finishes. |
void |
taskHasTimedout(TaskIdInterface taskId,
TestNodeInterface testNode,
java.lang.String testPermutation)
|
void |
taskReturnedData(TaskIdInterface taskId,
java.lang.String data)
This method is invoked when a line of test is outputted from the task. |
void |
taskSignalledReady(TaskIdInterface taskId)
|
void |
taskSignalledReady(TaskIdInterface taskId,
TestNodeInterface testNode,
java.lang.String testPermutation)
This method is invoked when the task signals Ready. |
void |
taskTimedOut(TaskRunner runner)
This method is called when a task which has been run times out |
boolean |
terminateAllTasks()
Terminate all tasks currently being run by this testnode. |
void |
terminateTask(TaskIdInterface taskId,
java.lang.String testPermutationCode)
|
void |
testFinished(java.lang.String permutationCode,
TaskIdInterface taskId,
java.lang.String testId)
Inform the test node that the test has finished and that it is now free to perform other tests. |
boolean |
updateSoftware()
Instructs the testnode to update its software for all the products it supports. |
boolean |
updateSoftware(java.lang.String productName,
boolean deploySoftware)
Called to inform the testnode that the given product should be updated. |
void |
waitForTask(TaskIdInterface taskId)
This method blocks until the task identified completes or until the timeoutValue elapses |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestNode(java.net.URL configFile, java.lang.String nameServiceURI, java.lang.String nodeName) throws java.rmi.RemoteException
configFile
- nameServiceURI
-
java.rmi.RemoteException
Method Detail |
---|
public void initialise(java.lang.String collatorIp, int collatorPort)
public boolean ping() throws java.rmi.RemoteException
TestNodeInterface
ping
in interface TestNodeInterface
java.rmi.RemoteException
public RemoteFileReaderInterface getDeployLogOutput(java.lang.String productName, boolean outOrErr) throws java.io.IOException, java.rmi.RemoteException
getDeployLogOutput
in interface TestNodeInterface
productName
- outOrErr
- True indicates the output stream and False indicates the error stream
java.rmi.RemoteException
java.io.IOException
public void initiateTest(java.lang.String currentTestId, TaskIdInterface taskId) throws java.rmi.RemoteException, TestNodeBusy
initiateTest
in interface TestNodeInterface
java.rmi.RemoteException
TestNodeBusy
public int performTask(java.lang.String taskType, java.util.Hashtable runnerParameters, java.lang.String className, java.lang.String classpathRef, java.lang.String taskName, java.lang.String[] parameters, java.lang.String[] jvmParameters, java.lang.String product, int timeoutValue, TaskIdInterface taskId, RunUID runId, java.lang.String taskPermutationCode, java.lang.String testPermutationCode) throws java.rmi.RemoteException, UnsupportedProduct, TestNodeBusy, TaskRunnerNotSupported
TestNodeInterface
performTask
in interface TestNodeInterface
taskType
- The type of test to be run.className
- The fully qualified name of the class to be run.parameters
- The parameters to be passed to this class.product
- The string identifier for the product that this test should be
run under.timeoutValue
- The amount of time the class is given to
produce the expected output. If it doesn't then the value RESULT_TIMEOUT
is returned.
java.rmi.RemoteException
- Thrown by the RMI implementation.
UnsupportedProduct
TestNodeBusy
TaskRunnerNotSupported
public void taskSignalledReady(TaskIdInterface taskId) throws java.rmi.RemoteException
java.rmi.RemoteException
public void taskFinished(TaskIdInterface taskId, TestNodeInterface testNode, java.lang.String testPermutation, boolean taskStartedSuccessfully) throws java.rmi.RemoteException, NoSuchTaskId
TaskResultListener
taskFinished
in interface TaskResultListener
taskId
- The task Id. of the task that finished.
java.rmi.RemoteException
NoSuchTaskId
public void terminateTask(TaskIdInterface taskId, java.lang.String testPermutationCode) throws java.rmi.RemoteException, NoSuchTaskId
terminateTask
in interface TestNodeInterface
java.rmi.RemoteException
NoSuchTaskId
public boolean terminateAllTasks() throws java.rmi.RemoteException
terminateAllTasks
in interface TestNodeInterface
java.rmi.RemoteException
public void taskReturnedData(TaskIdInterface taskId, java.lang.String data) throws java.rmi.RemoteException
TaskResultListener
taskReturnedData
in interface TaskResultListener
taskId
- The task id. of the task that returned data.data
- The information outputted from the task.
java.rmi.RemoteException
public java.lang.String getName() throws java.rmi.RemoteException
TestNodeInterface
getName
in interface TestNodeInterface
java.rmi.RemoteException
- Thrown by the RMI implementation.public java.lang.String getHostAddress() throws java.rmi.RemoteException
getHostAddress
in interface TestNodeInterface
java.rmi.RemoteException
public void testFinished(java.lang.String permutationCode, TaskIdInterface taskId, java.lang.String testId) throws java.rmi.RemoteException, TasksStillRunning
TestNodeInterface
testFinished
in interface TestNodeInterface
taskId
- The taskId indentifying the test which has finished.testId
- A string identifier for this test used to report back
the results to the Coordinator
java.rmi.RemoteException
TasksStillRunning
public TaskIdInterface generateTaskId(java.lang.String taskName) throws java.rmi.RemoteException, TestNodeBusy
TestNodeInterface
generateTaskId
in interface TestNodeInterface
taskName
- A name given to this task.
java.rmi.RemoteException
TestNodeBusy
public TaskId generateNewTaskId(java.lang.String taskName) throws java.rmi.RemoteException
java.rmi.RemoteException
public void waitForTask(TaskIdInterface taskId) throws java.rmi.RemoteException, NoSuchTaskId, java.lang.InterruptedException
TestNodeInterface
waitForTask
in interface TestNodeInterface
taskId
- The taskId identifying the task which must complete.
NoSuchTaskId
- This is thrown if a task isn't running with this task id.
java.rmi.RemoteException
java.lang.InterruptedException
public void runTask(java.lang.String taskType, java.util.Hashtable runnerParameters, java.lang.String className, java.lang.String classpathRef, java.lang.String taskName, java.lang.String[] parameters, java.lang.String[] jvmParameters, java.lang.String product, int testType, int timeoutValue, TaskResultListener listener, TaskIdInterface taskId, RunUID runId, java.lang.String taskPermutationCode, java.lang.String testPermutationCode) throws java.rmi.RemoteException, TestNodeBusy, UnsupportedProduct, TaskRunnerNotSupported
TestNodeInterface
runTask
in interface TestNodeInterface
className
- The fully qualified name of the class to be run.parameters
- The parameters to be passed to this class.timeoutValue
- The amount of time the class is given to
produce the expected output. If it doesn't then the value RESULT_TIMEOUT
is returned.listener
- A class which should be informed when the task returns information.
java.rmi.RemoteException
- Thrown by the RMI implementation.
TestNodeBusy
UnsupportedProduct
TaskRunnerNotSupported
public java.lang.String[] getActiveTaskList() throws java.rmi.RemoteException
getActiveTaskList
in interface TestNodeInterface
java.rmi.RemoteException
public void dumpActiveTaskList()
public void taskTimedOut(TaskRunner runner)
taskTimedOut
in interface TimeoutListener
runner
- The runner which is running this task.public void taskSignalledReady(TaskIdInterface taskId, TestNodeInterface testNode, java.lang.String testPermutation) throws java.rmi.RemoteException
taskSignalledReady
in interface TaskResultListener
taskId
- The task Id. of the task that signals Ready.
java.rmi.RemoteException
public boolean updateSoftware(java.lang.String productName, boolean deploySoftware) throws java.rmi.RemoteException
updateSoftware
in interface TestNodeInterface
productName
- The name of the product to update.deploySoftware
- Should the node deploy the software
java.rmi.RemoteException
public boolean updateSoftware() throws java.rmi.RemoteException, TestNodeBusy
TestNodeInterface
updateSoftware
in interface TestNodeInterface
java.rmi.RemoteException
TestNodeBusy
public void taskHasTimedout(TaskIdInterface taskId, TestNodeInterface testNode, java.lang.String testPermutation) throws java.rmi.RemoteException
taskHasTimedout
in interface TaskResultListener
java.rmi.RemoteException
public TestNodeDescription getNodeDescription() throws java.rmi.RemoteException
getNodeDescription
in interface TestNodeInterface
java.rmi.RemoteException
public void shutdown(boolean restart, boolean onComplete) throws java.rmi.RemoteException
TestNodeInterface
shutdown
in interface TestNodeInterface
restart
- If true the testnode will request to be restarted once it has shutdown
this will be used after a software update.onComplete
- If true the testnode will wait until it has completed it's current
test before shutting down.
java.rmi.RemoteException
public static void initialiseRegistry()
public static void main(java.lang.String[] args)
public static java.lang.String getOSId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |