public interface SessionManager2 extends SessionManager
PLAYER_SUPPORTS_GET, PREF_ACCEPT_TIMEOUT, PREF_CONNECT_RETRY_ATTEMPTS, PREF_CONNECT_TIMEOUT, PREF_CONNECT_WAIT_INTERVAL, PREF_CONTEXT_RESPONSE_TIMEOUT, PREF_GETVAR_RESPONSE_TIMEOUT, PREF_HIERARCHICAL_VARIABLES, PREF_INVOKE_GETTERS, PREF_RESPONSE_TIMEOUT, PREF_SETVAR_RESPONSE_TIMEOUT, PREF_SOCKET_TIMEOUT, PREF_SUSPEND_WAIT, PREF_SWFSWD_LOAD_TIMEOUT, PREF_URI_MODIFICATION
Modifier and Type | Method and Description |
---|---|
Session |
launch(String uri,
AIRLaunchInfo airLaunchInfo,
boolean forDebugging,
IProgress waitReporter,
ILaunchNotification launchNotification,
ILauncher launcher)
Launches the given string as a URI using the ILauncher Instance.
|
Process |
launchForRun(String uri,
AIRLaunchInfo airLaunchInfo,
IProgress waitReporter,
ILaunchNotification launchNotification)
This is, functionally, a clone of the SessionManager.launch() method.
|
Process |
launchForRun(String uri,
AIRLaunchInfo airLaunchInfo,
IProgress waitReporter,
ILaunchNotification launchNotification,
ILauncher launcher)
This is, functionally, a clone of the SessionManager.launch() method.
|
accept, connect, getPreference, isConnecting, isListening, launch, playerForUri, setDebuggerCallbacks, setPreference, setPreference, startListening, stopConnecting, stopListening, supportsLaunch
Process launchForRun(String uri, AIRLaunchInfo airLaunchInfo, IProgress waitReporter, ILaunchNotification launchNotification) throws IOException
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.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
.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.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.
The callback will be called on a different thread.IOException
- see Runtime.exec()Process launchForRun(String uri, AIRLaunchInfo airLaunchInfo, IProgress waitReporter, ILaunchNotification launchNotification, ILauncher launcher) throws IOException
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.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
.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.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.
The callback will be called on a different thread.launcher
- a launcher instance which will be used to launch.IOException
Session launch(String uri, AIRLaunchInfo airLaunchInfo, boolean forDebugging, IProgress waitReporter, ILaunchNotification launchNotification, ILauncher launcher) throws IOException
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()
.
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.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
.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
.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.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.BindException
- if isListening()
== falseFileNotFoundException
- if file cannot be locatedCommandLineException
- 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.IOException
- Exception during launch.Copyright © 2016 The Apache Software Foundation. All rights reserved.