This call will block until a session with the newly launched player is created.
It is the caller's responsibility to ensure that no other thread is blocking in accept()
, since that thread will gain control of this session.
Before calling launch()
, you should first call supportsLaunch()
. If supportsLaunch()
returns false, then you will have to tell the user to manually launch the Flash player.
Also, before calling launch()
, you must call startListening()
.
@param uri which will launch a Flash player under running OS. For Flash/Flex apps, this can point to either a SWF or an HTML file. For AIR apps, this must point to the application.xml file for the application.
@param airLaunchInfo If trying to launch an AIR application, this argument must be specified; it gives more information about how to do the launch. If trying to launch a regular web-based Flash or Flex application, such as one that will be in a browser or in the standalone Flash Player, this argument should be null
.
@param forDebugging if true
, then the launch is for the purposes of debugging. If false
, then the launch is simply because the user wants to run the movie but not debug it; in that case, the return value of this function will be null
.
@param waitReporter a progress monitor to allow accept() to notify its parent how long it has been waiting for the Flash player to connect to it. May be null
if the caller doesn't need to know how long it's been waiting.
@param launchNotification a notifier to notify the caller about ADL Exit Code. Main usage is for ADL Exit Code 1 (Successful invocation of an already running AIR application. ADL exits immediately). May be null
if no need to listen ADL. Will only be called if forDebugging is false. (If forDebugging is true, error conditions are handled by throwing an exception.) The callback will be called on a different thread.
@return a Session to use for debugging, or null if forDebugging==false.The return value is not used to indicate an error -- exceptions are used for that. If this function returns without throwing an exception, then the return value will always be non-null if forDebugging==true, or null if forDebugging==false.
@throws BindException if isListening()
== false
@throws FileNotFoundException if file cannot be located
@throws CommandLineException if the program that was launched exited unexpectedly. This will be returned, for example, when launching an AIR application, if adl exits with an error code. CommandLineException includes functions to return any error text that may have been sent to stdout/stderr, and the exit code of the program.
@throws IOException see Runtime.exec()
|
|
|
|