|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| package jtr.remote.test.impl; |
|
8 |
| |
|
9 |
| import java.rmi.RemoteException; |
|
10 |
| import java.rmi.server.UnicastRemoteObject; |
|
11 |
| import jtr.remote.test.*; |
|
12 |
| import jtr.test.ITestCompletionListener; |
|
13 |
| import jtr.test.SystemProperties; |
|
14 |
| import jtr.test.TestOutcomeTable; |
|
15 |
| import org.apache.log4j.Logger; |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| public class TestOutcomeCollectorImpl extends UnicastRemoteObject implements TestOutcomeCollector { |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
1
| public TestOutcomeCollectorImpl() throws RemoteException {
|
|
31 |
1
| super(new Integer(System.getProperty(SystemProperties.TEST_OUTCOME_COLLECTOR_SERVICE_PORT_PROPERTY,SystemProperties.TEST_OUTCOME_COLLECTOR_SERVICE_PORT.toString())).intValue());
|
|
32 |
1
| logger.debug("Using "+System.getProperty(SystemProperties.TEST_OUTCOME_COLLECTOR_SERVICE_PORT_PROPERTY)+"="
|
|
33 |
| +System.getProperty(SystemProperties.TEST_OUTCOME_COLLECTOR_SERVICE_PORT_PROPERTY,SystemProperties.TEST_OUTCOME_COLLECTOR_SERVICE_PORT.toString())); |
|
34 |
| } |
|
35 |
| |
|
36 |
1
| public void provideTestOutcome(NodeInfo srcJtrNode, TestOutcomeTable outcome) throws RemoteException {
|
|
37 |
1
| lsnr.notifyTestCompletion(srcJtrNode,outcome);
|
|
38 |
| } |
|
39 |
| |
|
40 |
1
| public void setRemoteTestCompletionListener(ITestCompletionListener lsnr) {
|
|
41 |
1
| if(this.lsnr==null) {
|
|
42 |
1
| this.lsnr = lsnr;
|
|
43 |
| } |
|
44 |
| } |
|
45 |
| |
|
46 |
| private static ITestCompletionListener lsnr; |
|
47 |
| private static final Logger logger = Logger.getLogger(TestOutcomeCollectorImpl.class); |
|
48 |
| } |