OSGi的一些支离破碎的知识

以下命令说明内容来自于Eclipse的OSGi框架Equinox。

---Controlling the OSGi framework---
launch - start the OSGi Framework
shutdown - shutdown the OSGi Framework
close - shutdown and exit
exit - exit immediately (System.exit)
init - uninstall all bundles
setprop <key>=<value> - set the OSGi property

---Controlling Bundles---
install - install and optionally start bundle from the given URL
uninstall - uninstall the specified bundle(s)
start - start the specified bundle(s)
stop - stop the specified bundle(s)
refresh - refresh the packages of the specified bundles
update - update the specified bundle(s)

---Displaying Status---
status [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display installed bundles and registered services
ss [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display installed bundles (short status)
services [filter] - display registered service details. Examples for [filter]: (objectClass=com.xyz.Person); (&(objectClass=com.xyz.Person)(|(sn=Jensen)(cn=Babs J*))); passing only com.xyz.Person is a shortcut for (objectClass=com.xyz.Person). The filter syntax specification is available athttp://www.ietf.org/rfc/rfc1960.txt
packages [<pkgname>|<id>|<location>] - display imported/exported package details
bundles [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display details for all installed bundles
bundle (<id>|<location>) - display details for the specified bundle(s)
headers (<id>|<location>) - print bundle headers

---Extras---
exec <command> - execute a command in a separate process and wait
fork <command> - execute a command in a separate process
gc - perform a garbage collection
getprop [ name ] - displays the system properties with the given name, or all of them.
props - Display system properties
threads - Display threads and thread groups

---Controlling Start Level---
sl [<id>|<location>] - display the start level for the specified bundle, or for the framework if no bundle specified
setfwsl <start level> - set the framework start level
setbsl <start level> (<id>|<location>) - set the start level for the bundle(s)
setibsl <start level> - set the initial bundle start level

---Controlling the Profiling---
profilelog - Display & flush the profile log messages

---Eclipse Runtime commands---
diag - Displays unsatisfied constraints for the specified bundle(s).
enableBundle - enable the specified bundle(s)
disableBundle - disable the specified bundle(s)
disabledBundles - list disabled bundles in the system

---Controlling the Console---
more - More prompt for console output
disconnect - Disconnects from telnet session
help <commmand> - Display help for the specified command

//=======================================================

接下来是一些常用命令范例

启动命令:
java -Dorg.osgi.service.http.port=8084 -jar equinox.jar -console  
安装bundle:
install  reference:file:plugins/ UserValidatorBundle_1.0.0.jar

config.ini范例

osgi.bundles=plugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar@1:start,plugins/org.eclipse.update.configurator_3.3.200.v20130326-1319.jar@2:start,plugins/com.systemmanagement.cpumonitor_1.0.0.201310121051.jar@2:start,plugins/com.systemmanagement.console_1.0.0.201310121051.jar@3:start

OSGI命令的更多相关文章

  1. osgi 命令

    安装命令 install reference:file:D:/workspace/workspace-osgi/MsgBoxCreateModule 根据 返回的 ID再运行start

  2. Eclipse OSGi调试过程

    当你在开发的插件直接运行的时候,看起来正常的.但导出放到eclipse时候,又发觉不对劲,插件运行有问题.这个时候需要去OSGi的控制台调试插件,这一篇文章将讲述怎么简单调试eclipse插件(插件已 ...

  3. 基于 Equinox 的 OSGi Console 的研究和探索

    自定制 OSGi Console 进行组建和服务生命周期管理模块化编程的好处已经很好地被理解了约 40 年,但在 OSGi 之前,开发人员不得不自己发明模块化设计和系统.随着软件应用体系结构的不断发展 ...

  4. OSGI插件(plugin)web工程建设步骤

     所有资源下载(汇总) 底包的下载地址:https://pan.baidu.com/s/15JxHOHf0AyZaLKPJUkpeXA 提取码: bujz web-target.war下载地址: ht ...

  5. Springboot Application 集成 OSGI 框架开发

    内容来源:https://www.ibm.com/developerworks/cn/java/j-springboot-application-integrated-osgi-framework-d ...

  6. JVM笔记11-类加载器和OSGI

    一.JVM 类加载器: 一个类在使用前,如何通过类调用静态字段,静态方法,或者new一个实例对象,第一步就是需要类加载,然后是连接和初始化,最后才能使用. 类从被加载到虚拟机内存中开始,到卸载出内存为 ...

  7. OSGi Bundle之Hello World

    开发一个简单的Hello World的OSGi Bundle(OSGi绑定包) 在OSGi中,软件是以Bundle的形式发布的.一个Bundle由Java类和其它资源构成,它可为其它的Bundle提供 ...

  8. osgi实战学习之路:5.生命周期及利用命令、装饰者模式实现基于socket交互Bundle命令demo

    生命周期中关键3个类: BundleActivator 入口点,类似main方法 BundleContext Bundle上下文对象,在执行期间,为应用程序提供操作osgi框架的方法 Bundle 代 ...

  9. 转:OSGi 入门篇:生命周期层

    OSGi 入门篇:生命周期层 前言 生命周期层在OSGi框架中属于模块层上面的一层,它的运作是建立在模块层的功能之上的.生命周期层一个主要的功能就是让你能够从外部管理应用或者建立能够自我管理的应用(或 ...

随机推荐

  1. JavaSE学习总结(八)—— 异常处理(Exception)

    一.理解异常及异常处理的概念 异常就是在程序的运行过程中所发生的不正常的事件,它会中断正在运行的程序. 异常不是错误 程序中关键的位置有异常处理,提高程序的稳定性 二.掌握Java异常处理机制 Jav ...

  2. springboot下实现邮件发送功能

    springboot给我们封装好了邮件功能,非常简单,只需要稍微配置下就ok. 引入jar <dependency> <groupId>org.springframework. ...

  3. 在O(N)时间内求解 正数数组中 两个数相加的 最大值

    一,问题描述 给定一个正数数组arr(即数组元素全是正数),找出该数组中,两个元素相加的最大值,其中被加数的下标大于加数的下标.由加法运算的可逆性,j >i 这个条件可以去掉. 即求出: max ...

  4. 工控安全入门之Ethernet/IP

    这一篇依然是协议层面的,协议层面会翻译三篇,下一篇是电力系统中用的比较多的DNP3.这一篇中大部分引用的资料都可以访问到,只有一篇reversemode.com上的writeup(http://rev ...

  5. Java添加过期注解

    加上 @Deprecated 后方法名称显示: 中划线(删除线)意为:发生这些变化并不会影响编译,只是提醒一下程序员,这个方法以后是要被删除的,最好别用.就是如果一个类从另外一个类继承,并且overr ...

  6. Django 2.0 学习(12):Django 模板语法

    Django 模板语法 一.模板 只要是在html里面有模板语法就不是html文件了,这样的文件就叫做模板. 二.模板语法 模板语法变量:{{ }} 在Django模板中遍历复杂数据结构的关键是句点字 ...

  7. kan

    http://blog.csdn.net/yahohi/article/details/7427724 http://duanhengbin.iteye.com/blog/1706635 http:/ ...

  8. 三维dp

    https://cn.vjudge.net/contest/245857#problem/C 代码: #include<iostream> #include<string> # ...

  9. mysql原理~二阶段提交

    一 简介:今天咱们来聊聊 mysql 两阶段提交二 事务过程    perpare-commit 两个过程1  perpare阶段 redo日志   1.设置undo state=TRX_UNDO_P ...

  10. 2018-2019-2 网络对抗技术 20165227 Exp2 后门原理与实践

    2018-2019-2 网络对抗技术 20165227 Exp2 后门原理与实践 (1)例举你能想到的一个后门进入到你系统中的可能方式? 接收邮件的方式 (2)例举你知道的后门如何启动起来(win及l ...