OSGI命令
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命令的更多相关文章
- osgi 命令
安装命令 install reference:file:D:/workspace/workspace-osgi/MsgBoxCreateModule 根据 返回的 ID再运行start
- Eclipse OSGi调试过程
当你在开发的插件直接运行的时候,看起来正常的.但导出放到eclipse时候,又发觉不对劲,插件运行有问题.这个时候需要去OSGi的控制台调试插件,这一篇文章将讲述怎么简单调试eclipse插件(插件已 ...
- 基于 Equinox 的 OSGi Console 的研究和探索
自定制 OSGi Console 进行组建和服务生命周期管理模块化编程的好处已经很好地被理解了约 40 年,但在 OSGi 之前,开发人员不得不自己发明模块化设计和系统.随着软件应用体系结构的不断发展 ...
- OSGI插件(plugin)web工程建设步骤
所有资源下载(汇总) 底包的下载地址:https://pan.baidu.com/s/15JxHOHf0AyZaLKPJUkpeXA 提取码: bujz web-target.war下载地址: ht ...
- Springboot Application 集成 OSGI 框架开发
内容来源:https://www.ibm.com/developerworks/cn/java/j-springboot-application-integrated-osgi-framework-d ...
- JVM笔记11-类加载器和OSGI
一.JVM 类加载器: 一个类在使用前,如何通过类调用静态字段,静态方法,或者new一个实例对象,第一步就是需要类加载,然后是连接和初始化,最后才能使用. 类从被加载到虚拟机内存中开始,到卸载出内存为 ...
- OSGi Bundle之Hello World
开发一个简单的Hello World的OSGi Bundle(OSGi绑定包) 在OSGi中,软件是以Bundle的形式发布的.一个Bundle由Java类和其它资源构成,它可为其它的Bundle提供 ...
- osgi实战学习之路:5.生命周期及利用命令、装饰者模式实现基于socket交互Bundle命令demo
生命周期中关键3个类: BundleActivator 入口点,类似main方法 BundleContext Bundle上下文对象,在执行期间,为应用程序提供操作osgi框架的方法 Bundle 代 ...
- 转:OSGi 入门篇:生命周期层
OSGi 入门篇:生命周期层 前言 生命周期层在OSGi框架中属于模块层上面的一层,它的运作是建立在模块层的功能之上的.生命周期层一个主要的功能就是让你能够从外部管理应用或者建立能够自我管理的应用(或 ...
随机推荐
- 如何解决win7系统无法运行cmd命令提示符
如何解决win7系统无法运行cmd命令提示符 CMD命令可以帮助我们很快的执行所需要的程序命令,可以查询系统中很多的信息和解决系统很多的故障,对我们来说非常方便,但是最近有用户反馈自己win7电脑 ...
- Linux命令之rmdir
rmdir命令 用处:删除文件夹 用法:在终端中输入rmdir加上要删除的文件夹的名字 示例: (我要删除shuyunquan这个文件夹)
- 5、JDBC-元信息
DatabaseMetaData:描述数据库的元数据对象 获取所有数据库 import org.junit.jupiter.api.AfterEach; import org.junit.jupite ...
- Junit测试private方法
package com.bill99.junit; public class ACase { private String echoRequest(String request) { return & ...
- 第二节:从程序集的角度分析MemoryCache,并完成基本封装
一. 轻车熟路 有了上一个章节对 System.Web.Caching.Cache 的探究,这里我们按照同样的思路对 MemoryCache 进行探究,相信必定会得心应手. 1. 程序集准备 a. 需 ...
- 解决IntelliJ IDEA无法读取配置*.properties文件的问题
idea对这些配置的文件方式很明显和eclipse是不同的.在idea中有一个 Content Roots的概念.需要为每一个folder配置相应的Content Roots.Content Root ...
- leetcode --binary tree
1. 求深度: recursive 遍历左右子树,递归跳出时每次加一. int maxDepth(node * root) { if(roor==NULL) return 0; int leftdep ...
- VS中修改工程名的解决方案
VS中修改工程名的解决方案: 一.先修改工程名/解决方案名(在VS中修改即可)举例,原先的工程名为OldProject 想要改成NewProject1.找到工程/解决方案所在的文件夹(已工程名/解 ...
- HDU小小练
hdu1253胜利大逃亡(bfs) 题意:就是城堡问题,找出可通行路径即可 思路:三维BFS,设定前后上下左右6个方向搜索,注意开始的时候人站的位置可以是墙. hdu1495非常可乐(bfs) 题意: ...
- F - 回转寿司 (权值线段树)
题目链接:https://cn.vjudge.net/contest/281960#problem/F 题目大意:中文题目 具体思路:权值线段树,我们每次寻找的是满足 (i<j) L< ...