我应该如何实现OSGi控制台到捆绑? [英] How should I implement the OSGi console into a Bundle?

查看:199
本文介绍了我应该如何实现OSGi控制台到捆绑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要从我的bundle管理其他bundle /服务。所以我需要能够使用ss,安装和unistall命令至少在已经安装或没有安装的其他服务。所有这些命令必须在没有人工干预的情况下进行管理,所以我必须在我的应用程序中实现。
这个程序将安装在uPC上,而不需要连续监视。



我已经将Google OSGi控制台实现成捆绑,没有相关性。



我使用OSGi 3.7.1并试图依赖于Equinox。

解决方案

您可以检查org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider类和org.eclipse.core.runtime.internal.adaptor.EclipseCommandProvider类,您将看到命令实现。并且每个命令可以通过具有(classobject = org.eclipse.osgi.framework.console.CommandProvider)过滤器的服务访问。


I'm new on OSGi and I'm trying to implement the osgi console into a bundle.

I need to manage the other bundles/services from my bundle. So I need to be able to use the "ss", "install" and "unistall" commands at least on other services already installed or not. All this commands must be managed without human interaction, so I must to implement this into my application. This program will be installed on a uPC without a continuous monitoring.

I've googled the way to implement the OSGi console into a bundle but i cant found nothing relevant.

I'm using OSGi 3.7.1 and trying to deply on an Equinox.

解决方案

you can checke the org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider class and org.eclipse.core.runtime.internal.adaptor.EclipseCommandProvider class , you will see the command implement. and every Command can access by services with " (classobject=org.eclipse.osgi.framework.console.CommandProvider)" filter.

这篇关于我应该如何实现OSGi控制台到捆绑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆