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/BackgroundThreadTask.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
index 3ba772b..0309735 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
@@ -31,12 +31,14 @@
/**
* This class defines a thread that will be used to actually perform the
* processing for a background task.
+ * @param <T> type of object returned by the background task fed to this
+ * object
*/
-class BackgroundTaskThread
+class BackgroundTaskThread<T>
extends Thread
{
// The background task that is to be processed.
- private final BackgroundTask backgroundTask;
+ private final BackgroundTask<T> backgroundTask;
@@ -46,7 +48,7 @@
*
* @param backgroundTask The task to be processed.
*/
- public BackgroundTaskThread(BackgroundTask backgroundTask)
+ public BackgroundTaskThread(BackgroundTask<T> backgroundTask)
{
this.backgroundTask = backgroundTask;
}
@@ -60,7 +62,7 @@
{
try
{
- Object returnValue = backgroundTask.processBackgroundTask();
+ T returnValue = backgroundTask.processBackgroundTask();
backgroundTask.backgroundTaskCompleted(returnValue, null);
}
catch (Throwable t)
--
Gitblit v1.10.0