|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jnlp.JNLPFile
public class JNLPFile
Provides methods to access the information in a Java Network Launching Protocol (JNLP) file. The Java Network Launching Protocol specifies in an XML file the information needed to load, cache, and run Java code over the network and in a secure environment.
This class represents the overall information about a JNLP file from the jnlp element. Other information is accessed through objects that represent the elements of a JNLP file (information, resources, application-desc, etc). References to these objects are obtained by calling the getInformation, getResources, getSecurity, etc methods.
Field Summary | |
---|---|
protected java.net.URL |
codeBase
the URL used to resolve relative URLs in the file |
protected ComponentDesc |
component
the component description |
protected java.lang.String |
defaultArch
the default jvm |
protected java.util.Locale |
defaultLocale
the default OS |
protected java.lang.String |
defaultOS
the default arch |
protected java.net.URL |
fileLocation
the network location of this JNLP file |
protected Version |
fileVersion
file version |
protected java.util.List<InformationDesc> |
info
information |
protected java.lang.Object |
launchType
the application description |
protected java.util.List<ResourcesDesc> |
resources
resources |
protected SecurityDesc |
security
the security descriptor |
protected ResourcesDesc |
sharedResources
additional resources not in JNLP file (from command line) |
protected java.net.URL |
sourceLocation
the location this JNLP file was created from |
protected Version |
specVersion
spec version |
protected java.lang.String |
uniqueKey
A key that uniquely identifies connected instances (main jnlp+ext) |
protected UpdateDesc |
update
|
Constructor Summary | |
---|---|
protected |
JNLPFile()
Empty stub, allowing child classes to override the constructor |
|
JNLPFile(java.io.InputStream input,
boolean strict)
Create a JNLPFile from an input stream. |
|
JNLPFile(java.net.URL location)
Create a JNLPFile from a URL. |
|
JNLPFile(java.net.URL location,
boolean strict)
Create a JNLPFile from a URL checking for updates using the default policy. |
|
JNLPFile(java.net.URL location,
java.lang.String uniqueKey,
Version version,
boolean strict,
UpdatePolicy policy)
Create a JNLPFile from a URL, parent URLm a version and checking for updates using the specified policy. |
|
JNLPFile(java.net.URL location,
Version version,
boolean strict)
Create a JNLPFile from a URL and a Version checking for updates using the default policy. |
|
JNLPFile(java.net.URL location,
Version version,
boolean strict,
UpdatePolicy policy)
Create a JNLPFile from a URL and a version, checking for updates using the specified policy. |
Method Summary | |
---|---|
AppletDesc |
getApplet()
Returns the launch information for an applet. |
ApplicationDesc |
getApplication()
Returns the launch information for an application. |
java.net.URL |
getCodeBase()
Returns the codebase URL for the JNLP file. |
ComponentDesc |
getComponent()
Returns the launch information for a component. |
DownloadOptions |
getDownloadOptionsForJar(JARDesc jar)
XXX: this method does a "==" comparison between the input JARDesc and jars it finds through getResourcesDescs(). |
java.net.URL |
getFileLocation()
Returns the location of the file parsed to create the JNLP file, or null if it was not created from a URL. |
Version |
getFileVersion()
Returns the JNLP file's version. |
InformationDesc |
getInformation()
Returns the information section of the JNLP file as viewed through the default locale. |
InformationDesc |
getInformation(java.util.Locale locale)
Returns the information section of the JNLP file as viewed through the specified locale. |
InstallerDesc |
getInstaller()
Returns the launch information for an installer. |
java.lang.Object |
getLaunchInfo()
Returns an object of one of the following types: AppletDesc, ApplicationDesc and InstallerDesc |
java.util.List<java.lang.String> |
getNewVMArgs()
|
ResourcesDesc |
getResources()
Returns the resources section of the JNLP file as viewed through the default locale and the os.name and os.arch properties. |
ResourcesDesc |
getResources(java.util.Locale locale,
java.lang.String os,
java.lang.String arch)
Returns the resources section of the JNLP file for the specified locale, os, and arch. |
ResourcesDesc[] |
getResourcesDescs()
Returns the resources section of the JNLP file as viewed through the default locale and the os.name and os.arch properties. |
ResourcesDesc[] |
getResourcesDescs(java.util.Locale locale,
java.lang.String os,
java.lang.String arch)
Returns the resources section of the JNLP file for the specified locale, os, and arch. |
SecurityDesc |
getSecurity()
Returns the security section of the JNLP file. |
java.net.URL |
getSourceLocation()
Returns the JNLP file's network location as specified in the JNLP file. |
Version |
getSpecVersion()
Returns the specification version required by the file. |
java.lang.String |
getTitle()
Returns the JNLP file's title. |
java.lang.String |
getUniqueKey()
Returns the location of the parent file if it exists, null otherwise |
UpdateDesc |
getUpdate()
Returns the update section of the JNLP file. |
boolean |
isApplet()
Returns whether the lauch descriptor describes an Applet. |
boolean |
isApplication()
Returns whether the lauch descriptor describes an Application. |
boolean |
isComponent()
Returns whether the lauch descriptor describes a Component. |
boolean |
isInstaller()
Returns whether the lauch descriptor describes an Installer. |
boolean |
needsNewVM()
|
void |
setDefaults(java.lang.String os,
java.lang.String arch,
java.util.Locale locale)
Sets the default view of the JNLP file returned by getInformation, getResources, etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.URL sourceLocation
protected java.net.URL fileLocation
protected java.lang.String uniqueKey
protected java.net.URL codeBase
protected Version fileVersion
protected Version specVersion
protected java.util.List<InformationDesc> info
protected UpdateDesc update
protected java.util.List<ResourcesDesc> resources
protected ResourcesDesc sharedResources
protected java.lang.Object launchType
protected ComponentDesc component
protected SecurityDesc security
protected java.util.Locale defaultLocale
protected java.lang.String defaultOS
protected java.lang.String defaultArch
Constructor Detail |
---|
protected JNLPFile()
public JNLPFile(java.net.URL location) throws java.io.IOException, ParseException
location
- the location of the JNLP file
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidpublic JNLPFile(java.net.URL location, boolean strict) throws java.io.IOException, ParseException
location
- the location of the JNLP filestrict
- whether to enforce the spec when
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidpublic JNLPFile(java.net.URL location, Version version, boolean strict) throws java.io.IOException, ParseException
location
- the location of the JNLP fileversion
- the version of the JNLP filestrict
- whether to enforce the spec when
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidpublic JNLPFile(java.net.URL location, Version version, boolean strict, UpdatePolicy policy) throws java.io.IOException, ParseException
location
- the location of the JNLP fileversion
- the version of the JNLP filestrict
- whether to enforce the spec whenpolicy
- the update policy
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidpublic JNLPFile(java.net.URL location, java.lang.String uniqueKey, Version version, boolean strict, UpdatePolicy policy) throws java.io.IOException, ParseException
location
- the location of the JNLP fileuniqueKey
- A string that uniquely identifies connected instancesversion
- the version of the JNLP filestrict
- whether to enforce the spec whenpolicy
- the update policy
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidpublic JNLPFile(java.io.InputStream input, boolean strict) throws ParseException
java.io.IOException
- if an IO exception occurred
ParseException
- if the JNLP file was invalidMethod Detail |
---|
public java.lang.String getTitle()
public java.net.URL getSourceLocation()
public java.net.URL getFileLocation()
public java.lang.String getUniqueKey()
public Version getFileVersion()
public Version getSpecVersion()
public java.net.URL getCodeBase()
public InformationDesc getInformation()
public InformationDesc getInformation(java.util.Locale locale)
public UpdateDesc getUpdate()
public SecurityDesc getSecurity()
public ResourcesDesc getResources()
public ResourcesDesc getResources(java.util.Locale locale, java.lang.String os, java.lang.String arch)
public ResourcesDesc[] getResourcesDescs()
public ResourcesDesc[] getResourcesDescs(java.util.Locale locale, java.lang.String os, java.lang.String arch)
public java.lang.Object getLaunchInfo()
public AppletDesc getApplet()
java.lang.UnsupportedOperationException
- if there is no applet informationpublic ApplicationDesc getApplication()
java.lang.UnsupportedOperationException
- if there is no application informationpublic ComponentDesc getComponent()
java.lang.UnsupportedOperationException
- if there is no component informationpublic InstallerDesc getInstaller()
java.lang.UnsupportedOperationException
- if there is no installer informationpublic boolean isApplet()
public boolean isApplication()
public boolean isComponent()
public boolean isInstaller()
public void setDefaults(java.lang.String os, java.lang.String arch, java.util.Locale locale)
public boolean needsNewVM()
public java.util.List<java.lang.String> getNewVMArgs()
public DownloadOptions getDownloadOptionsForJar(JARDesc jar)
jar:
- the jar whose download options to get.
|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |