[RFC][icedtea-web]: DownloadService implementation
Adam Domurad
adomurad at redhat.com
Tue Oct 9 13:03:44 PDT 2012
On 10/05/2012 05:37 PM, Saad Mohammad wrote:
> Hi Adam,
>
> Thanks for the review of DownloadService implementation patch. The updated patch
> is attached.
>
> As you recommend in the review, I have moved as much functionality as I could
> away from JNLPClassLoader to two new classes:
> net.sourceforge.jnlp.runtime.LocateJnlpClassLoader
> net.sourceforge.jnlp.runtime.ManageJnlpResources
>
> I also removed XDownloadService helper and replaced it with
> XDownloadService.getClassLoader( ). For unit testing purposes, I will just
> create a class which inherits from XDownloadService and only override
> getClassLoader( ) so it returns a mocked JNLPClassLoader since runtime resources
> are not available.
>
> You can still test this patch with the reproducer patch. Let me know if you have
> any other questions. Thanks :).
>
> Changelog:
>
> 2012-10-05 Saad Mohammad <smohammad at redhat.com>
>
> Core implementation of DownloadService.
> * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCacheParentDirectory):
> Returns the parent directory of the cached resource.
> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
> (getLoaders): Returns all loaders that this loader uses, including
> itself
> (addNewJar): Adds a new jar to the classloader with specified
> UpdatePolicy.
> (removeJars): Remove jars from the filesystem.
> (initializeNewJarDownload): Downloads and initializes jars into the
> current loader.
> (manageExternalJars): Manages jars which are not mentioned in the
> JNLP file.
> * netx/net/sourceforge/jnlp/runtime/LocateJnlpClassLoader.java:
> (getLoaderByJnlpFile): Returns the classloader of the jnlp file
> specified.
> (getLoaderByResourceUrl): Returns the classloader that contains the
> specified jar.
> * netx/net/sourceforge/jnlp/runtime/ManageJnlpResources.java:
> (findJars): Returns jars from the JNLP file with the specified
> partname.
> (removeCachedJars): Removes jar from cache.
> (downloadJars): Downloads jars identified by part name.
> (loadExternalResouceToCache): Download and initalize resources which
> are not mentioned in the jnlp file.
> (removeExternalCachedResource): Removes resources from cache which
> are not mentioned in the jnlp file.
> (isExternalResourceCached): Determines if the resource that is not
> mentioned in the jnlp file is cached and returns a boolean with the
> result.
> * netx/net/sourceforge/jnlp/services/XDownloadService.java:
> Core implementation of DownloadService.
>
>
>
(Resending to list)
Thanks for the updated patch!
Looks good to me, go ahead and push once reproducer is in HEAD.
Cheers,
- Adam
More information about the distro-pkg-dev
mailing list