/// <summary> Launches a Player using the given string as a URI, as defined by RFC2396. /// It is expected that the operating system will be able to launch the /// appropriate player application given this URI. /// <p /> /// For example "http://localhost:8100/flex/my.mxml" or for a local file on /// Windows, "file://c:/my.swf" /// <p /> /// This call will block until a session with the newly launched player is /// created. /// <p /> /// It is the caller's responsibility to ensure that no other thread is /// blocking in <code>accept()</code>, since that thread will gain control /// of this session. /// <p /> /// Before calling <code>launch()</code>, you should first call /// <code>supportsLaunch()</code>. If <code>supportsLaunch()</code> /// returns false, then you will have to tell the user to manually launch the /// Flash player. /// <p /> /// Also, before calling <code>launch()</code>, you must call /// <code>startListening()</code>. /// /// </summary> /// <param name="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> /// <param name="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 /// <code>null</code>. /// </param> /// <param name="forDebugging">if <code>true</code>, then the launch is for the purposes /// of debugging. If <code>false</code>, 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 /// <code>null</code>. /// </param> /// <param name="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 <code>null</code> if the caller doesn't need to /// know how long it's been waiting. /// </param> /// <returns> 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. /// </returns> /// <throws> BindException </throws> /// <summary> if <code>isListening()</code> == false /// </summary> /// <throws> FileNotFoundException </throws> /// <summary> if file cannot be located /// </summary> /// <throws> CommandLineException </throws> /// <summary> 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. /// </summary> /// <throws> IOException </throws> /// <summary> see Runtime.exec() /// </summary> public abstract Session launch(String uri, AIRLaunchInfo airLaunchInfo, bool forDebugging, IProgress waitReporter);