Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.osgi.framework.launcher
Class Launcher  view Launcher download Launcher.java

java.lang.Object
  extended byorg.eclipse.osgi.framework.launcher.Launcher

public class Launcher
extends java.lang.Object

This class provides an entry point for launching the OSGi framework. It configures the OSGi framework according to the command line arguments:

  • -app[lication]:application-args
        [application-args] := *( ":" [value])
        [value] := [token] | [quoted-string]
     

    This argument allows arguments to be passed to specific applications at launch time. This is for eclipse plugins installed as applications. The arguments are as Eclipse currently needs them - one list of key=value pairs which are parsed by the applications. The application peels off only the args that apply to it. Others are ignored.

  • Any other command line arguments are passed on to the console window of the framework if started with the -console option. If the console is not started, any unrecognized arguments will be ignored and a message displayed.

    If none of the options above are specified, the OSGi framework is started:


    Field Summary
    protected  java.lang.String[] adaptorArgs
              array of adaptor arguments to be passed to FrameworkAdaptor.initialize()
    protected  java.lang.String adaptorClassName
              string containing the classname of the adaptor to be used in this framework instance
    protected  boolean console
              flag to indicate whether or not to start the console
    protected  java.lang.String consolePort
              default console port
    private static java.lang.String OSGI_CONSOLE_COMPONENT
               
    private static java.lang.String OSGI_CONSOLE_COMPONENT_NAME
               
    protected  java.lang.String osgiConsoleClazz
               
     
    Constructor Summary
    Launcher()
              Default constructor.
     
    Method Summary
    protected  void _adaptor(java.lang.String command)
              Remembers that the -adaptor option has been requested.
    protected  void _console(java.lang.String command)
              Remembers that the -console option has been requested.
    protected  org.eclipse.osgi.framework.adaptor.FrameworkAdaptor doAdaptor()
              Processes the -adaptor command line argument.
    protected  void doConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi, java.lang.String[] consoleArgs)
              Invokes the OSGi Console on another thread
    protected  void doIt(java.lang.String[] args)
              Performs the actual launch based on the command line arguments
    protected  org.eclipse.osgi.framework.internal.core.OSGi doOSGi(org.eclipse.osgi.framework.adaptor.FrameworkAdaptor adaptor)
              Creates the OSGi framework object.
    (package private)  void informAboutMissingComponent(java.lang.String component, java.lang.String jar)
              Informs the user about a missing component.
    static void main(java.lang.String[] args)
              main method for Launcher.
    static boolean matchCommand(java.lang.String command, java.lang.String input, int minLength)
               
    private  java.lang.String[] parseArgs(java.lang.String[] args)
              Parses the command line arguments and remembers them so they can be processed later.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    consolePort

    protected java.lang.String consolePort
    default console port


    console

    protected boolean console
    flag to indicate whether or not to start the console


    adaptorClassName

    protected java.lang.String adaptorClassName
    string containing the classname of the adaptor to be used in this framework instance


    osgiConsoleClazz

    protected final java.lang.String osgiConsoleClazz
    See Also:
    Constant Field Values

    adaptorArgs

    protected java.lang.String[] adaptorArgs
    array of adaptor arguments to be passed to FrameworkAdaptor.initialize()


    OSGI_CONSOLE_COMPONENT_NAME

    private static final java.lang.String OSGI_CONSOLE_COMPONENT_NAME
    See Also:
    Constant Field Values

    OSGI_CONSOLE_COMPONENT

    private static final java.lang.String OSGI_CONSOLE_COMPONENT
    See Also:
    Constant Field Values
    Constructor Detail

    Launcher

    public Launcher()
    Default constructor. Nothing at all to do here.

    Method Detail

    main

    public static void main(java.lang.String[] args)
    main method for Launcher. This method creates an Launcher object and kicks off the actual launch of a Framework instance.


    doIt

    protected void doIt(java.lang.String[] args)
    Performs the actual launch based on the command line arguments


    parseArgs

    private java.lang.String[] parseArgs(java.lang.String[] args)
    Parses the command line arguments and remembers them so they can be processed later.


    matchCommand

    public static boolean matchCommand(java.lang.String command,
                                       java.lang.String input,
                                       int minLength)

    _console

    protected void _console(java.lang.String command)
    Remembers that the -console option has been requested.


    _adaptor

    protected void _adaptor(java.lang.String command)
    Remembers that the -adaptor option has been requested. Parses off the adaptor class file name, the adaptor file name, and the size if they are there.


    doAdaptor

    protected org.eclipse.osgi.framework.adaptor.FrameworkAdaptor doAdaptor()
                                                                     throws java.lang.Exception
    Processes the -adaptor command line argument. Parses the arguments to get the adaptor class name, the adaptor dir or filename, and the adaptor file size.


    doOSGi

    protected org.eclipse.osgi.framework.internal.core.OSGi doOSGi(org.eclipse.osgi.framework.adaptor.FrameworkAdaptor adaptor)
    Creates the OSGi framework object.


    doConsole

    protected void doConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi,
                             java.lang.String[] consoleArgs)
    Invokes the OSGi Console on another thread


    informAboutMissingComponent

    void informAboutMissingComponent(java.lang.String component,
                                     java.lang.String jar)
    Informs the user about a missing component.