org.testng.remote.adapter
Class DefaultWorkerAdapter
java.lang.Object
org.testng.remote.adapter.DefaultWorkerAdapter
- All Implemented Interfaces:
- IWorkerAdapter
public class DefaultWorkerAdapter
- extends java.lang.Object
- implements IWorkerAdapter
Default Slave adapter, provides an adapter based on static port.
- Author:
- Guy Korland
Method Summary |
XmlSuite |
getSuite(long timeout)
A blocking call to get the next Suite to test. |
void |
init(java.util.Properties prop)
Initializes the worker adapter. |
void |
returnResult(ISuite result)
Return a suite result. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLAVE_PORT
public static final java.lang.String SLAVE_PORT
- See Also:
- Constant Field Values
DefaultWorkerAdapter
public DefaultWorkerAdapter()
init
public void init(java.util.Properties prop)
throws java.lang.Exception
- Description copied from interface:
IWorkerAdapter
- Initializes the worker adapter.
- Specified by:
init
in interface IWorkerAdapter
- Parameters:
prop
- holds the properties loaded from the remote.properties file.
- Throws:
java.lang.Exception
- adapter might throw any exception on initialization, which will abort this adapter.
getSuite
public XmlSuite getSuite(long timeout)
throws java.lang.InterruptedException,
java.io.IOException
- Description copied from interface:
IWorkerAdapter
- A blocking call to get the next Suite to test.
- Specified by:
getSuite
in interface IWorkerAdapter
- Parameters:
timeout
- the maximum time to wait for the next suite.
- Returns:
- the next suite avaliable or
null
if the timeout has reached.
- Throws:
java.lang.InterruptedException
- if interrupted while waiting.
java.io.IOException
- might be thrown on IO error.
returnResult
public void returnResult(ISuite result)
throws java.io.IOException
- Description copied from interface:
IWorkerAdapter
- Return a suite result.
- Specified by:
returnResult
in interface IWorkerAdapter
- Parameters:
result
- the result to return
- Throws:
java.io.IOException
- might be thrown on IO error.
Copyright © 2011. All Rights Reserved.