[RFC][icedtea-web]: DownloadService implementation
Saad Mohammad
smohammad at redhat.com
Fri Oct 5 14:37:08 PDT 2012
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.
--
Cheers,
Saad Mohammad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implementation9.patch
Type: text/x-patch
Size: 24337 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/1dcc13b3/implementation9.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changelog0-2.patch
Type: text/x-patch
Size: 1787 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/1dcc13b3/changelog0-2.patch
More information about the distro-pkg-dev
mailing list