|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jnlp.Launcher
public class Launcher
Launches JNLPFiles either in the foreground or background.
An optional LaunchHandler can be specified that is notified of warning and error condition while launching and that indicates whether a launch may proceed after a warning has occurred. If specified, the LaunchHandler is notified regardless of whether the file is launched in the foreground or background.
Constructor Summary | |
---|---|
Launcher()
Create a launcher with the runtime's default update policy and launch handler. |
|
Launcher(boolean exitOnFailure)
Create a launcher with the runtime's default update policy and launch handler. |
|
Launcher(LaunchHandler handler)
Create a launcher with the specified handler and the runtime's default update policy. |
|
Launcher(LaunchHandler handler,
UpdatePolicy policy)
Create a launcher with an optional handler using the specified update policy and launch handler. |
Method Summary | |
---|---|
protected net.sourceforge.jnlp.runtime.AppletInstance |
createApplet(JNLPFile file,
boolean enableCodeBase,
java.awt.Container cont)
Create an AppletInstance. |
protected java.applet.Applet |
createAppletObject(JNLPFile file,
boolean enableCodeBase,
java.awt.Container cont)
Creates an Applet object from a JNLPFile. |
protected net.sourceforge.jnlp.runtime.ApplicationInstance |
createApplication(JNLPFile file)
Creates an Application. |
protected net.sourceforge.jnlp.runtime.AppThreadGroup |
createThreadGroup(JNLPFile file)
Create a thread group for the JNLP file. |
protected net.sourceforge.jnlp.runtime.ApplicationInstance |
getApplet(JNLPFile file,
boolean enableCodeBase,
java.awt.Container cont)
Gets an ApplicationInstance, but does not launch the applet. |
UpdatePolicy |
getUpdatePolicy()
Returns the update policy used when launching applications. |
boolean |
isCreateAppContext()
Returns whether applications are launched in their own AppContext. |
net.sourceforge.jnlp.runtime.ApplicationInstance |
launch(JNLPFile file)
Launches a JNLP file by calling the launch method for the appropriate file type. |
net.sourceforge.jnlp.runtime.ApplicationInstance |
launch(JNLPFile file,
java.awt.Container cont)
Launches a JNLP file inside the given container if it is an applet. |
net.sourceforge.jnlp.runtime.ApplicationInstance |
launch(java.net.URL location)
Launches a JNLP file by calling the launch method for the appropriate file type. |
protected net.sourceforge.jnlp.runtime.ApplicationInstance |
launchApplet(JNLPFile file,
boolean enableCodeBase,
java.awt.Container cont)
Launches a JNLP applet. |
protected net.sourceforge.jnlp.runtime.ApplicationInstance |
launchApplication(JNLPFile file)
Launches a JNLP application. |
void |
launchBackground(JNLPFile file)
Launches a JNLP file by calling the launch method for the appropriate file type in a different thread. |
void |
launchBackground(java.net.URL location)
Launches the JNLP file at the specified location in the background by calling the launch method for its file type. |
void |
launchExternal(java.util.List<java.lang.String> vmArgs,
JNLPFile file,
java.util.List<java.lang.String> javawsArgs)
Launches the JNLP file in a new JVM instance. |
void |
launchExternal(java.util.List<java.lang.String> vmArgs,
java.util.List<java.lang.String> javawsArgs)
Launches the JNLP file at the specified location in a new JVM instance. |
void |
launchExternal(java.net.URL url)
Launches the JNLP file in a new JVM instance. |
protected net.sourceforge.jnlp.runtime.ApplicationInstance |
launchInstaller(JNLPFile file)
Launches a JNLP installer. |
void |
setCreateAppContext(boolean context)
Sets whether to launch the application in a new AppContext (a separate event queue, look and feel, etc). |
void |
setUpdatePolicy(UpdatePolicy policy)
Sets the update policy used by launched applications. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Launcher()
public Launcher(boolean exitOnFailure)
exitOnFailure
- Exit if there is an error (usually default, but false when being used from the plugin)public Launcher(LaunchHandler handler)
handler
- the handler to use or null for no handler.public Launcher(LaunchHandler handler, UpdatePolicy policy)
handler
- the handler to use or null for no handler.policy
- the update policy to use or null for default policy.Method Detail |
---|
public void setUpdatePolicy(UpdatePolicy policy)
public UpdatePolicy getUpdatePolicy()
public void setCreateAppContext(boolean context)
public boolean isCreateAppContext()
public net.sourceforge.jnlp.runtime.ApplicationInstance launch(JNLPFile file) throws LaunchException
file
- the JNLP file to launch
LaunchException
- if an error occurred while launching (also sent to handler)public net.sourceforge.jnlp.runtime.ApplicationInstance launch(JNLPFile file, java.awt.Container cont) throws LaunchException
file
- the JNLP file to launchcont
- the container in which to place the application, if it is an applet
LaunchException
- if an error occurred while launching (also sent to handler)public net.sourceforge.jnlp.runtime.ApplicationInstance launch(java.net.URL location) throws LaunchException
location
- the URL of the JNLP file to launch
LaunchException
- if there was an exceptionpublic void launchBackground(JNLPFile file)
file
- the JNLP file to launchpublic void launchBackground(java.net.URL location)
location
- the location of the JNLP filepublic void launchExternal(java.util.List<java.lang.String> vmArgs, JNLPFile file, java.util.List<java.lang.String> javawsArgs) throws LaunchException
vmArgs
- the arguments to pass to the new JVM. Can be empty but
must not be null.file
- the JNLP file to launchjavawsArgs
- the arguments to pass to the javaws command. Can be
an empty list but must not be null.
LaunchException
- if there was an exceptionpublic void launchExternal(java.net.URL url) throws LaunchException
url
- the URL of the JNLP file to launch
LaunchException
- if there was an exceptionpublic void launchExternal(java.util.List<java.lang.String> vmArgs, java.util.List<java.lang.String> javawsArgs) throws LaunchException
vmArgs
- the arguments to pass to the jvmjavawsArgs
- the arguments to pass to javaws (aka Netx)
LaunchException
- if there was an exceptionprotected net.sourceforge.jnlp.runtime.ApplicationInstance launchApplication(JNLPFile file) throws LaunchException
LaunchException
protected net.sourceforge.jnlp.runtime.ApplicationInstance launchApplet(JNLPFile file, boolean enableCodeBase, java.awt.Container cont) throws LaunchException
The enableCodeBase parameter adds the applet's codebase to the locations searched for resources and classes. This can slow down the applet loading but allows browser-style applets that don't use JAR files exclusively to be run from a applet JNLP file. If the applet JNLP file does not specify any resources then the code base will be enabled regardless of the specified value.
file
- the JNLP fileenableCodeBase
- whether to add the codebase URL to the classloader
LaunchException
protected net.sourceforge.jnlp.runtime.ApplicationInstance getApplet(JNLPFile file, boolean enableCodeBase, java.awt.Container cont) throws LaunchException
LaunchException
protected net.sourceforge.jnlp.runtime.ApplicationInstance launchInstaller(JNLPFile file) throws LaunchException
LaunchException
protected net.sourceforge.jnlp.runtime.AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, java.awt.Container cont) throws LaunchException
enableCodeBase
- whether to add the code base URL to the classloader
LaunchException
protected java.applet.Applet createAppletObject(JNLPFile file, boolean enableCodeBase, java.awt.Container cont) throws LaunchException
file
- the PluginBridge to be used.enableCodeBase
- whether to add the code base URL to the classloader.
LaunchException
protected net.sourceforge.jnlp.runtime.ApplicationInstance createApplication(JNLPFile file) throws LaunchException
LaunchException
protected net.sourceforge.jnlp.runtime.AppThreadGroup createThreadGroup(JNLPFile file)
|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |