]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/AsynchronousTreeTestResultListener.java
Add web service notification of results.
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / tree / AsynchronousTreeTestResultListener.java
index 7713e46168b89e5def6037dcb963d0a5cd104d68..a3dc33f3ba5505bf90a8e355d49f867cb4faafde 100644 (file)
@@ -3,7 +3,6 @@ package org.argeo.slc.core.test.tree;
 import java.util.Vector;\r
 \r
 import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.test.NumericTRId;\r
 import org.argeo.slc.core.test.TestResult;\r
 import org.argeo.slc.core.test.TestResultListener;\r
 import org.argeo.slc.core.test.TestResultPart;\r
@@ -12,6 +11,7 @@ import org.argeo.slc.core.test.TestResultPart;
  * Abstract asynchronous implementation of a listener listening to a\r
  * <code>TreeTestResult</code>.\r
  * \r
+ * @deprecated listeners should be called synchronously\r
  * @see TreeTestResult\r
  */\r
 public abstract class AsynchronousTreeTestResultListener implements\r
@@ -20,12 +20,12 @@ public abstract class AsynchronousTreeTestResultListener implements
        private Thread thread;\r
 \r
        private Boolean synchronous = true;\r
-       \r
-       protected AsynchronousTreeTestResultListener(){\r
+\r
+       protected AsynchronousTreeTestResultListener() {\r
                this(true);\r
        }\r
 \r
-       protected AsynchronousTreeTestResultListener(Boolean synchronousByDefault){\r
+       protected AsynchronousTreeTestResultListener(Boolean synchronousByDefault) {\r
                synchronous = synchronousByDefault;\r
        }\r
 \r
@@ -59,8 +59,8 @@ public abstract class AsynchronousTreeTestResultListener implements
        public final void resultPartAdded(TestResult testResult,\r
                        TestResultPart testResultPart) {\r
                TreeTestResult result = (TreeTestResult) testResult;\r
-               PartStruct partStruct = new PartStruct(result.getCurrentPath(),\r
-                               (NumericTRId) result.getTestResultId(), testResultPart, result);\r
+               PartStruct partStruct = new PartStruct(result.getCurrentPath(), result\r
+                               .getUuid(), testResultPart, result);\r
 \r
                if (!synchronous) {\r
                        synchronized (partStructs) {\r
@@ -108,18 +108,18 @@ public abstract class AsynchronousTreeTestResultListener implements
                /** The tree path of this part. */\r
                public final TreeSPath path;\r
                /** The test result id of the related test result */\r
-               public final NumericTRId resultId;\r
+               public final String uuid;\r
                /** The part itself */\r
                public final TestResultPart part;\r
                /** The tree test result itself. */\r
                public final TreeTestResult result;\r
 \r
                /** Constructor */\r
-               public PartStruct(TreeSPath path, NumericTRId resultId,\r
-                               TestResultPart part, TreeTestResult result) {\r
+               public PartStruct(TreeSPath path, String uuid, TestResultPart part,\r
+                               TreeTestResult result) {\r
                        super();\r
                        this.path = path;\r
-                       this.resultId = resultId;\r
+                       this.uuid = uuid;\r
                        this.part = part;\r
                        this.result = result;\r
                }\r