From 23faffa02e132a30c02f928e317c6f66ac373d06 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Mon, 23 Apr 2007 00:29:32 +0000
Subject: [PATCH] The commit contains code for the following:

---
 opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
index 8a82ac6..cadb6f0 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
@@ -32,8 +32,9 @@
  * This class provides a mechanism for running a task in the background using a
  * separate thread and providing the caller with notification when it has
  * completed.
+ * @param <T> type of object returned by this process
  */
-public abstract class BackgroundTask
+public abstract class BackgroundTask<T>
 {
   /**
    * Creates a new thread and begins running the task in the background.  When
@@ -42,7 +43,7 @@
    */
   public final void startBackgroundTask()
   {
-    BackgroundTaskThread taskThread = new BackgroundTaskThread(this);
+    BackgroundTaskThread taskThread = new BackgroundTaskThread<T>(this);
     taskThread.start();
   }
 
@@ -57,7 +58,7 @@
    * @throws Exception exception that will be passed through the method
    *          backgroundTaskCompleted.
    */
-  public abstract Object processBackgroundTask() throws Exception;
+  public abstract T processBackgroundTask() throws Exception;
 
 
 
@@ -77,6 +78,6 @@
    *                      was raised during processing, or {@code null} if all
    *                      processing completed successfully.
    */
-  public abstract void backgroundTaskCompleted(Object returnValue,
+  public abstract void backgroundTaskCompleted(T returnValue,
                                                Throwable throwable);
 }

--
Gitblit v1.10.0