org.testng.remote.adapter
Interface IWorkerAdapter

All Known Implementing Classes:
DefaultWorkerAdapter

public interface IWorkerAdapter

This interface should be implemented by the Master-Slave transport adapter. This interface is used by the Slave to pull suites and return results.

Author:
Guy Korland
See Also:
IMasterAdapter

Method Summary
 XmlSuite getSuite(long timeout)
          A blocking call to get the next Suite to test.
 void init(Properties properties)
          Initializes the worker adapter.
 void returnResult(ISuite result)
          Return a suite result.
 

Method Detail

init

void init(Properties properties)
          throws Exception
Initializes the worker adapter.

Parameters:
properties - holds the properties loaded from the remote.properties file.
Throws:
Exception - adapter might throw any exception on initialization, which will abort this adapter.

getSuite

XmlSuite getSuite(long timeout)
                  throws InterruptedException,
                         IOException
A blocking call to get the next Suite to test.

Parameters:
timeout - the maximum time to wait for the next suite.
Returns:
the next suite avaliable or null if the timeout has reached.
Throws:
IOException - might be thrown on IO error.
InterruptedException - if interrupted while waiting.

returnResult

void returnResult(ISuite result)
                  throws IOException
Return a suite result.

Parameters:
result - the result to return
Throws:
IOException - might be thrown on IO error.


Copyright © 2011. All Rights Reserved.