jnlp.sample.servlet
Class ResourceCatalog
java.lang.Object
jnlp.sample.servlet.ResourceCatalog
public class ResourceCatalog
- extends Object
Method Summary |
int |
findMatch(List list,
String name,
DownloadRequest dreq,
JnlpResource[] result)
This method finds the best match, or return the best error code. |
JnlpResource |
lookupResource(DownloadRequest dreq)
|
int |
matchEntry(String name,
VersionString vs,
DownloadRequest dreq,
JnlpResource jnlpres,
VersionID vid)
|
boolean |
prefixMatchLists(String[] prefixes,
String[] keys)
|
List |
scanDirectory(String dirPath,
DownloadRequest dreq)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION_XML_FILENAME
public static final String VERSION_XML_FILENAME
- See Also:
- Constant Field Values
ResourceCatalog
public ResourceCatalog(ServletContext servletContext,
Logger log)
lookupResource
public JnlpResource lookupResource(DownloadRequest dreq)
throws ErrorResponseException
- Throws:
ErrorResponseException
findMatch
public int findMatch(List list,
String name,
DownloadRequest dreq,
JnlpResource[] result)
- This method finds the best match, or return the best error code. The
result parameter must be an array with room for one element.
If a match is found, the method returns DownloadResponse.STS_00_OK
If one or more entries matches on: name, version-id, os, arch, and locale,
then the one with the highest version-id is set in the result[0] field.
If a match is not found, it returns an error code, either: ERR_10_NO_RESOURCE,
ERR_11_NO_VERSION, ERR_20_UNSUP_OS, ERR_21_UNSUP_ARCH, ERR_22_UNSUP_LOCALE,
ERR_23_UNSUP_JRE.
matchEntry
public int matchEntry(String name,
VersionString vs,
DownloadRequest dreq,
JnlpResource jnlpres,
VersionID vid)
prefixMatchLists
public boolean prefixMatchLists(String[] prefixes,
String[] keys)
scanDirectory
public List scanDirectory(String dirPath,
DownloadRequest dreq)
Copyright © 2005-2011 Sun Microsystems. All Rights Reserved.