Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Let OSGi frameworks supply a ToolProvider for their framework #867

@laeubi

Description

@laeubi

We currently already require that a framework supports a Framework(Connect)Factory that allows programmatic creation of OSGi frameworks.

But this is quite low level and requires a lot of boilerplate to really get started something that actually is a framework (create it, init, start the system bundle install some inital bundles, raise a start level and so on) while it actually should be very simple and because of this most frameworks also support some kind of (framework specific) java "main" class to start it from the commandline.

To unify access to such "commandline interfaces" Java offers so called ToolProvider that allow a unified access.

I think it would be beneficial if we define such a generic CLI so there is an easy way to fire-up a new framework with less efforts and controll it via the System.in / out as a simple console.

Lets assume we call the tool osgi it should has the following unified parameters:

  • -Pkey value to define a framework property that is used to create the instance
  • -B <path to a bundle> <startlevel>:<autostart> a bundle that will be installed and optionally have a startlevel and autostart value assigned

That way one can already get something running very fast by just throw in a bunch of jars and can be controlled through the I/O streams with the following commands:

  • start / stop <path to bundle> - for starting / stopping a bundle
  • install / uninstall <path to bundle> - for install a new bundle or uninstall an existing one
  • shutdown - to shutdown the framework

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions