net.sf.taverna.raven.launcher
Class Launcher

java.lang.Object
  extended by net.sf.taverna.raven.launcher.Launcher

public class Launcher
extends java.lang.Object

Launcher called by the PreLauncher after making sure Raven etc. is on the classpath.

The Launcher will find the Raven LocalRepository through ApplicationRuntime.getRavenRepository(). It then initialises the PluginManager so that it can use the SpiRegistry of Launchables to find the instance of the class named by ApplicationConfig.APP_MAIN in the raven-launcher.properties. The Launchable.launch(String[]) method is then executed.

Author:
Stian Soiland-Reyes

Constructor Summary
Launcher()
           
 
Method Summary
 Launchable findMainClass(java.lang.String className)
          Find the instance of the given class name by looking it up in the SpiRegistry of Launchables.
 int launchMain(java.lang.String[] args)
          Launch the main Launchable method as resolved from findMainClass(String).
static void main(java.lang.String[] args)
          Call the "real" application
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Launcher

public Launcher()
Method Detail

main

public static void main(java.lang.String[] args)
Call the "real" application

Parameters:
args -

findMainClass

public Launchable findMainClass(java.lang.String className)
                         throws java.lang.InstantiationException,
                                java.lang.IllegalAccessException,
                                java.lang.ClassNotFoundException
Find the instance of the given class name by looking it up in the SpiRegistry of Launchables.

The PluginManager is also initialised.

Parameters:
className -
Returns:
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

launchMain

public int launchMain(java.lang.String[] args)
Launch the main Launchable method as resolved from findMainClass(String).

Parameters:
args - Arguments to pass to Launchable.launch(String[])
Returns:
The status code of launching, 0 means success.