net.sourceforge.jnlp.cache
Class ResourceUrlCreator
java.lang.Object
net.sourceforge.jnlp.cache.ResourceUrlCreator
public class ResourceUrlCreator
- extends java.lang.Object
Method Summary |
protected java.net.URL |
getUrl(Resource resource,
boolean usePack,
boolean useVersion)
Returns a url for the resource. |
java.util.List<java.net.URL> |
getUrls()
Returns a list of URLs that the resources might be downloadable from. |
protected java.net.URL |
getVersionedUrlUsingQuery(Resource resource)
Returns the URL for a resource, relying on HTTP query for getting the
right version |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resource
protected final Resource resource
downloadOptions
protected final DownloadOptions downloadOptions
ResourceUrlCreator
public ResourceUrlCreator(Resource resource,
DownloadOptions downloadOptions)
getUrls
public java.util.List<java.net.URL> getUrls()
- Returns a list of URLs that the resources might be downloadable from.
The Resources may not be downloadable from any of them. The returned order is the order
the urls should be attempted in.
- Returns:
getUrl
protected java.net.URL getUrl(Resource resource,
boolean usePack,
boolean useVersion)
- Returns a url for the resource.
- Parameters:
resource
- the resourceusePack
- whether the URL should point to the pack200 fileuseVersion
- whether the URL should be modified to include the version
- Returns:
- a URL for the resource or null if an appropraite URL can not be found
getVersionedUrlUsingQuery
protected java.net.URL getVersionedUrlUsingQuery(Resource resource)
- Returns the URL for a resource, relying on HTTP query for getting the
right version
- Parameters:
resource
- the resource to get the url for
Submit a bug or feature