Package net.sourceforge.jnlp.runtime
Class ManageJnlpResources
java.lang.Object
net.sourceforge.jnlp.runtime.ManageJnlpResources
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddownloadJars(JNLPClassLoader classLoader, URL ref, String part, Version version) Downloads jars identified by part name.static JARDesc[]findJars(JNLPClassLoader rootClassLoader, URL ref, String part, Version version) Returns jars from the JNLP file with the part name provided.static booleanisExternalResourceCached(JNLPClassLoader rootClassLoader, URL ref, String version) Returnstrueif the resource (not mentioned in the jnlp file) is cached, otherwisefalseUsed by DownloadService.static voidloadExternalResouceToCache(JNLPClassLoader rootClassLoader, URL ref, String version) Downloads and initializes resources which are not mentioned in the jnlp file.static voidremoveCachedJars(JNLPClassLoader classLoader, URL ref, JARDesc[] jars) Removes jars from cache.static voidremoveExternalCachedResource(JNLPClassLoader rootClassLoader, URL ref, String version) Removes resource which are not mentioned in the jnlp file.
-
Constructor Details
-
ManageJnlpResources
public ManageJnlpResources()
-
-
Method Details
-
findJars
public static JARDesc[] findJars(JNLPClassLoader rootClassLoader, URL ref, String part, Version version) Returns jars from the JNLP file with the part name provided.- Parameters:
rootClassLoader- Root JNLPClassLoader of the application.ref- Path of the launch or extension JNLP File containing the resource. If null, main JNLP's file location will be used instead.part- The name of the part.version- version of jar- Returns:
- jars found.
-
removeCachedJars
Removes jars from cache.- Parameters:
classLoader- JNLPClassLoader of the application that is associated to the resource.ref- Path of the launch or extension JNLP File containing the resource. If null, main JNLP's file location will be used instead.jars- Jars marked for removal.
-
downloadJars
Downloads jars identified by part name.- Parameters:
classLoader- JNLPClassLoader of the application that is associated to the resource.ref- Path of the launch or extension JNLP File containing the resource. If null, main JNLP's file location will be used instead.part- The name of the path.version- version of jar to be downlaoded
-
loadExternalResouceToCache
public static void loadExternalResouceToCache(JNLPClassLoader rootClassLoader, URL ref, String version) Downloads and initializes resources which are not mentioned in the jnlp file. Used by DownloadService.- Parameters:
rootClassLoader- Root JNLPClassLoader of the application.ref- Path to the resource.version- The version of resource. If null, no version is specified.
-
removeExternalCachedResource
public static void removeExternalCachedResource(JNLPClassLoader rootClassLoader, URL ref, String version) Removes resource which are not mentioned in the jnlp file. Used by DownloadService.- Parameters:
rootClassLoader- Root JNLPClassLoader of the application.ref- Path to the resource.version- The version of resource. If null, no version is specified.
-
isExternalResourceCached
public static boolean isExternalResourceCached(JNLPClassLoader rootClassLoader, URL ref, String version) Returnstrueif the resource (not mentioned in the jnlp file) is cached, otherwisefalseUsed by DownloadService.- Parameters:
rootClassLoader- RootJNLPClassLoaderof the application.ref- Path to the resource.version- The version of resource. Ifnull, no version is specified.- Returns:
trueif the external resource is cached, otherwisefalse
-