geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r617267 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Thu, 31 Jan 2008 22:35:35 GMT
Author: gawor
Date: Thu Jan 31 14:35:24 2008
New Revision: 617267

URL: http://svn.apache.org/viewvc?rev=617267&view=rev
Log:
add a parameter to checkOnInstall() function to control if/when the DownloadResults should
be removed from the cache

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=617267&r1=617266&r2=617267&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Thu Jan 31 14:35:24 2008
@@ -753,10 +753,27 @@
      * @param key Identifies the operation to check on
      */
     public DownloadResults checkOnInstall(Object key) {
+        return checkOnInstall(key, true);
+    }
+    
+    /**
+     * Gets the current progress of a download operation.  
+     *
+     * @param key Identifies the operation to check on
+     * @param remove If true and the download operation has finished, the DownloadResults
+     *        will be forgotten and the next call to this function will return null. 
+     *        Otherwise, the DownloadResults will be retained until this function is 
+     *        called with the <tt>remove</tt> parameter set to true. This parameter
is
+     *        only used when the download operation has finished 
+     *        (DownloadResults.isFinished() returns true).
+     */
+    public DownloadResults checkOnInstall(Object key, boolean remove) {
         DownloadResults results = asyncKeys.get(key);
-        results = results.duplicate();
-        if (results.isFinished()) {
-            asyncKeys.remove(key);
+        if (results != null) {               
+            results = results.duplicate();
+            if (results.isFinished() && remove) {
+                asyncKeys.remove(key);
+            }
         }
         return results;
     }



Mime
View raw message