public class DefaultWorkerAdapter extends java.lang.Object implements IWorkerAdapter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SLAVE_PORT |
Constructor and Description |
---|
DefaultWorkerAdapter() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final java.lang.String SLAVE_PORT
public void init(java.util.Properties prop) throws java.lang.Exception
IWorkerAdapter
init
in interface IWorkerAdapter
prop
- holds the properties loaded from the remote.properties file.java.lang.Exception
- adapter might throw any exception on initialization, which will abort this adapter.public XmlSuite getSuite(long timeout) throws java.lang.InterruptedException, java.io.IOException
IWorkerAdapter
getSuite
in interface IWorkerAdapter
timeout
- the maximum time to wait for the next suite.null
if the timeout has reached.java.lang.InterruptedException
- if interrupted while waiting.java.io.IOException
- might be thrown on IO error.public void returnResult(ISuite result) throws java.io.IOException
IWorkerAdapter
returnResult
in interface IWorkerAdapter
result
- the result to returnjava.io.IOException
- might be thrown on IO error.