IcedTea-Web
NetX

net.sourceforge.jnlp.cache
Class ResourceUrlCreator

java.lang.Object
  extended by net.sourceforge.jnlp.cache.ResourceUrlCreator

public class ResourceUrlCreator
extends java.lang.Object


Field Summary
protected  DownloadOptions downloadOptions
           
protected  Resource resource
           
 
Constructor Summary
ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions)
           
 
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
 

Field Detail

resource

protected final Resource resource

downloadOptions

protected final DownloadOptions downloadOptions
Constructor Detail

ResourceUrlCreator

public ResourceUrlCreator(Resource resource,
                          DownloadOptions downloadOptions)
Method Detail

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 resource
usePack - whether the URL should point to the pack200 file
useVersion - 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

IcedTea-Web
NetX

Submit a bug or feature