org.testng.remote.adapter
Class DefaultWorkerAdapter
java.lang.Object
org.testng.remote.adapter.DefaultWorkerAdapter
- All Implemented Interfaces:
- IWorkerAdapter
public class DefaultWorkerAdapter
- extends Object
- implements IWorkerAdapter
Default Slave adapter, provides an adapter based on static port.
- Author:
- Guy Korland
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLAVE_PORT
public static final String SLAVE_PORT
- See Also:
- Constant Field Values
DefaultWorkerAdapter
public DefaultWorkerAdapter()
init
public void init(Properties prop)
throws 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:
Exception
- adapter might throw any exception on initialization, which will abort this adapter.
getSuite
public XmlSuite getSuite(long timeout)
throws InterruptedException,
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:
InterruptedException
- if interrupted while waiting.
IOException
- might be thrown on IO error.
returnResult
public void returnResult(ISuite result)
throws IOException
- Description copied from interface:
IWorkerAdapter
- Return a suite result.
- Specified by:
returnResult
in interface IWorkerAdapter
- Parameters:
result
- the result to return
- Throws:
IOException
- might be thrown on IO error.
Copyright © 2010. All Rights Reserved.