netx.jnlp

Class DefaultLaunchHandler

Implemented Interfaces:
LaunchHandler

public class DefaultLaunchHandler
extends java.lang.Object
implements LaunchHandler

This default implementation shows prints the exception to stdout and if not in headless mode displays the exception in a dialog.
Version:
$Revision: 1.1 $
Author:
Jon A. Maxwell (JAM) - initial author

Method Summary

void
launchCompleted(ApplicationInstance application)
Called when an application, applet, or installer has been launched successfully (the main method or applet start method returned normally).
void
launchError(LaunchException exception)
Called when the application could not be launched due to a fatal error, such as the inability to find the main class or non-parseable XML.
boolean
launchWarning(LaunchException warning)
Called when launching the application can not be launched due to an error that is not fatal.
protected void
printMessage(LaunchException ex)
Print a message to stdout.
boolean
validationError(LaunchException security)
Called when a security validation error occurs while launching the application.

Method Details

launchCompleted

public void launchCompleted(ApplicationInstance application)
Called when an application, applet, or installer has been launched successfully (the main method or applet start method returned normally).
Specified by:
launchCompleted in interface LaunchHandler
Parameters:
application - the launched application instance

launchError

public void launchError(LaunchException exception)
Called when the application could not be launched due to a fatal error, such as the inability to find the main class or non-parseable XML.
Specified by:
launchError in interface LaunchHandler

launchWarning

public boolean launchWarning(LaunchException warning)
Called when launching the application can not be launched due to an error that is not fatal. For example a JNLP file that is not strictly correct yet does not necessarily prohibit the system from attempting to launch the application.
Specified by:
launchWarning in interface LaunchHandler
Returns:
true if the launch should continue, false to abort

printMessage

protected void printMessage(LaunchException ex)
Print a message to stdout.

validationError

public boolean validationError(LaunchException security)
Called when a security validation error occurs while launching the application.
Specified by:
validationError in interface LaunchHandler
Returns:
true to allow the application to continue, false to stop it.