]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/core/test/tree/AsynchronousTreeTestResultListener.java
Improve formatting of the code.
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / test / tree / AsynchronousTreeTestResultListener.java
index 3ac38de5dd44953c602efb9a06bbcecd9a13b4a4..751b0e9b150427448eb5070535f71ee7970da83f 100644 (file)
@@ -26,7 +26,7 @@ public abstract class AsynchronousTreeTestResultListener implements
        }\r
 \r
        /** Finish the remaining and destroy */\r
-       public void close() {\r
+       public void close(TestResult testResult) {\r
                synchronized (partStructs) {\r
                        // TODO: put a timeout\r
                        while (partStructs.size() != 0) {\r
@@ -39,6 +39,7 @@ public abstract class AsynchronousTreeTestResultListener implements
                        thread = null;\r
                        partStructs.notifyAll();\r
                }\r
+               postClose((TreeTestResult) testResult);\r
        }\r
 \r
        public final void resultPartAdded(TestResult testResult,\r
@@ -55,6 +56,14 @@ public abstract class AsynchronousTreeTestResultListener implements
        /** Called when a result part has been added. */\r
        protected abstract void resultPartAdded(PartStruct partStruct);\r
 \r
+       /**\r
+        * Called at the end of close. Default implementation is empty. To be\r
+        * overridden.\r
+        */\r
+       protected void postClose(TreeTestResult testResult) {\r
+\r
+       }\r
+\r
        public void run() {\r
                while (thread != null) {\r
                        synchronized (partStructs) {\r