at.spardat.xma.boot
Class Launcher
java.lang.Object
at.spardat.xma.boot.Launcher
- public class Launcher
- extends java.lang.Object
Entry class for xma component calls. This class starts an XMA client by its main() method.
Possible are also calls to Launcher.lauch() (e.g. from JNI).
This class is works directly from a commandline (java) as well as by a browser call via the .xma
mime type linking. Typically a script or some java launch programm attached to the .xma mime type
would start the XMA client with a call to this classes main method.
When an XMA client is started by some link inside a browser then first the XMA server is connected.
In this case the XmaLauncherServlet sends back some response attached to the .xma mime type which
so will activate the XMA client launcher. Unfortunatly the XmaLauncherServlet response differs
in its format from the arguments of a command line call.
As this class cannot know per se how it was started some preprocessing has to be done before
the XMA client is launched.
If this classes main was started by commandline the first argument must be a valid URL of an
XMA component (without .xma!). In the case of activation by a browser the first argument to main()
is a path of a temporary file holding the XmaLauncherServlet response.
Before starting Launcher.main this class checks the first argument.
If this is a valid URL then an commandline start is assumed,
if it is not a valid URL than a path to an XmaLauncherServlet response is assumed.
Example Commandline
java at.spardat.xma.Launcher [key value]
java at.spardat.xma.boot.Launcher http://localhost:8080/jndiTest/Test param1 value1
Example Browsercall
The XmaLauncherServlet creates a response from which the Browser creates a temp file. In this
case the launcher is started by the browser with the path to this file as argument
java at.spardat.xma.boot.Launcher
java at.spardat.xma.boot.Launcher "C:\Documents and Settings\s3460\Local Settings\Temporary Internet Files\Content.IE5\0P2F4PYN\Test[1].xma"
The response from the XmaLauncherServlet has the form of an ini file:
-----------------------------------------------
[Component]
name=http://localhost:8080/localtest/Test
[Params]
showPopUp=true
reuseWin=testappl
-----------------------------------------------
(Note: In former XMA versions only a C-programm "xmalaunchw.exe" dealt with the maLauncherServlet response
and called at.spardat.xma.boot.Launcher by JNI)
|
Method Summary |
static java.util.Properties |
getBootRuntimeProperties()
Get the properties loaded by the BootRuntime from bootcfg.properties. |
static void |
init()
initialize the runtime if necessary |
static KeyValue[] |
launch(java.lang.String component,
KeyValue[] parameters)
common launch method |
static KeyValue[] |
launchGUILess(java.lang.String component,
KeyValue[] parameters)
|
static void |
main(java.lang.String[] args)
main |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Launcher
public Launcher()
launch
public static KeyValue[] launch(java.lang.String component,
KeyValue[] parameters)
- common launch method
launchGUILess
public static KeyValue[] launchGUILess(java.lang.String component,
KeyValue[] parameters)
main
public static void main(java.lang.String[] args)
- main
init
public static void init()
throws java.io.IOException
- initialize the runtime if necessary
- Throws:
java.io.IOException
getBootRuntimeProperties
public static java.util.Properties getBootRuntimeProperties()
- Get the properties loaded by the BootRuntime from bootcfg.properties.
- Returns:
- the properties or null if the BootRuntime is not initialized yet.
- Since:
- 1.7.0