Hi,

This is an Equinox specific question that should be asked on the Equinox
lists.

Unfortunately the Equinox console commands are not meant to be called
programmatically.  I think the new command work being specified by OSGi in
a future release does allow for this kind of stuff.  For equinox you could
implement your own CommandInterpreter that looks for the proper
CommandProvider service to call for the command to execute.

Tom




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Ashish Billore1 <[email protected]>                                 
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[email protected]                                                       
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |08/24/2009 08:05 AM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[osgi-dev] Executing OSGi commands Programmatically                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





Hello Everyone,

      I am trying to execute OSGi console commands (such as ss, bundle,
start etc) programmatically (thorough a java class in another bundle). I am
using Eclipse's equinox runtime, where I could find following related
classes / interfaces:

org.eclipse.osgi.framework.console.CommandInterpreter
org.eclipse.osgi.framework.console.CommandProvider

Of these, CommandInterpreter is of interest to me, as I wish to call
something like:

CommandInterpreter.execute("ss");

However, the problem is how to get the reference to CommandInterpreter
object as this is passed by the framework to CommandProvider through a call
back, something like:

public void _myCommand(CommandInterpreter ci)
{...}

So, is there a way to:
- Get the CommandInterpreter reference programmatically?
- Any other way to execute osgi commands programmatically?

Thanks for the help.


Best Regards,
Ashish Billore

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to