基础的API

BundleActivator   BundleContext  ServiceReference  HelloServiceFactory  ServiceTracker

osgi

疑惑:

Import-Package

最最基础的bundle中包含哪些 package?

很多, org.osgi.framework 是其中一个,  org.osgi.framework.BundleActivator 则是位于其下。

为什么只导入package ‘org.osgi.framework ’ 即可,不需要导入整个org.eclipse.osgi_3.2.0.v20060601.jar bundle吗?

org.eclipse.osgi_3.2.0.v20060601.jar  对应几个bundle ————  osgi中 一个jar 只能对应一个bundle吗? 是的!

看看其中的MANIFEST.MF就知道了吧

Manifest-Version: 1.0
Bundle-Activator: org.eclipse.osgi.framework.internal.core.SystemBundl
eActivator
Bundle-RequiredExecutionEnvironment: J2SE-1.4,OSGi/Minimum-1.0
Export-Package: org.eclipse.osgi.event;version="1.0",org.eclipse.osgi.
framework.console;version="1.0",org.eclipse.osgi.framework.eventmgr;v
ersion="1.0",org.eclipse.osgi.framework.log;version="1.0",org.eclipse
.osgi.service.datalocation;version="1.0",org.eclipse.osgi.service.deb
ug;version="1.0",org.eclipse.osgi.service.environment;version="1.0",o
rg.eclipse.osgi.service.localization;version="1.0",org.eclipse.osgi.s
ervice.pluginconversion;version="1.0",org.eclipse.osgi.service.resolv
er;version="1.0",org.eclipse.osgi.service.runnable;version="1.0",org.
eclipse.osgi.service.urlconversion;version="1.0",org.eclipse.osgi.sto
ragemanager;version="1.0",org.eclipse.osgi.util;version="1.0",org.osg
i.framework;version="1.3",org.osgi.service.condpermadmin;version="1.0
",org.osgi.service.packageadmin;version="1.2",org.osgi.service.permis
sionadmin;version="1.2",org.osgi.service.startlevel;version="1.0",org
.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.3.1"
,org.eclipse.core.runtime.adaptor;x-friends:="org.eclipse.core.runtim
e",org.eclipse.core.runtime.internal.adaptor;x-internal:=true,org.ecl
ipse.core.runtime.internal.stats;x-friends:="org.eclipse.core.runtime
",org.eclipse.osgi.baseadaptor;x-internal:=true,org.eclipse.osgi.base
adaptor.bundlefile;x-internal:=true,org.eclipse.osgi.baseadaptor.hook
s;x-internal:=true,org.eclipse.osgi.baseadaptor.loader;x-internal:=tr
ue,org.eclipse.osgi.framework.adaptor;x-internal:=true,org.eclipse.os
gi.framework.debug;x-internal:=true,org.eclipse.osgi.framework.intern
al.core;x-internal:=true,org.eclipse.osgi.framework.internal.protocol
;x-internal:=true,org.eclipse.osgi.framework.internal.protocol.bundle
entry;x-internal:=true,org.eclipse.osgi.framework.internal.protocol.b
undleresource;x-internal:=true,org.eclipse.osgi.framework.internal.pr
otocol.reference;x-internal:=true,org.eclipse.osgi.framework.internal
.reliablefile;x-internal:=true,org.eclipse.osgi.framework.launcher;x-
internal:=true,org.eclipse.osgi.framework.util;x-internal:=true,org.e
clipse.osgi.internal.baseadaptor;x-internal:=true,org.eclipse.osgi.in
ternal.module;x-internal:=true,org.eclipse.osgi.internal.profile;x-in
ternal:=true,org.eclipse.osgi.internal.resolver;x-internal:=true,org.
eclipse.osgi.internal.verifier;x-internal:=true,org.eclipse.osgi.inte
rnal.provisional.verifier;x-friends:="org.eclipse.update.core,org.ecl
ipse.ui.workbench"
Bundle-Version: 3.2..v20060601
Eclipse-SystemBundle: true
Bundle-Copyright: %copyright
Bundle-Name: %systemBundle
Bundle-Description: %systemBundle
Bundle-DocUrl: http://www.eclipse.org
Bundle-ManifestVersion:
Export-Service: org.osgi.service.packageadmin.PackageAdmin,org.osgi.se
rvice.permissionadmin.PermissionAdmin,org.osgi.service.startlevel.Sta
rtLevel,org.eclipse.osgi.service.debug.DebugOptions
Bundle-Vendor: %eclipse.org
Main-Class: org.eclipse.core.runtime.adaptor.EclipseStarter
Bundle-SymbolicName: org.eclipse.osgi; singleton:=true
Bundle-Localization: systembundle
Eclipse-ExtensibleAPI: true

osgi 2的更多相关文章

  1. OSGi规范的C#实现开源

    这是大约在3-4年前完成的一个C#实现的OSGi框架,实现的过程参照了OSGi规范与与一些实现思路(感谢当时的那些资料与项目),此框架虽然仅在几个小型项目有过实际的应用,但OSGi的规范实现还是相对比 ...

  2. 分享在Linux下使用OSGi.NET插件框架快速实现一个分布式服务集群的方法

    在这篇文章我分享了如何使用分层与模块化的方法来设计一个分布式服务集群.这个分布式服务集群是基于DynamicProxy.WCF和OSGi.NET插件框架实现的.我将从设计思路.目标和实现三方面来描述. ...

  3. OSGi 基本原理

    定义 OSGi(Open Service Gateway Initiative)技术是面向Java的动态模型系统. 这个框架实现了一个优雅.完整和动态地组价模型.应用程序(称为bundle)无序重新引 ...

  4. 重新诠释的OSGi规范

    上周五部门开会讨论新一代产品(基于.net Winform)的设计规范,从设计规范慢慢讨论到体系结构等架构存在的问题,诸如菜单.工具条.状态条.界面布局等不能实现配置化和自动化,子系统之间拥有强依赖, ...

  5. Liferay7 BPM门户开发之38: OSGi模块化Bndtools、Maven、Gradle开发构建入门

    前言 OSGi是目前动态模块系统的事实上的工业标准,它适用于任何需要模块化.面向服务.面向组件的应用程序.Eclipse如此庞大和复杂的插件体系,就是基于OSGi.Liferay也是基于OSGi.OS ...

  6. 开源协议:LGPL协议、OSGi协议---打酱油的日子

    本文介绍开源的协议. LGPL 是 GNU Lesser General Public License (GNU 宽通用公共许可证)的缩写形式,旧称 GNU Library General Publi ...

  7. 原创:Equinox OSGi应用嵌入Jersey框架搭建REST服务

    一.环境 eclipse版本:eclipse-luna 4.4 jre版本:1.8 二.Equinox OSGi应用嵌入Jersey框架搭建REST服务 1.新建插件工程HelloWebOSGI a. ...

  8. 转:OSGi 入门篇:模块层

    OSGi 入门篇:模块层 1 什么是模块化 模块层是OSGi框架中最基础的一部分,其中Java的模块化特性在这一层得到了很好的实现.但是这种实现与Java本身现有的一些模块化特性又有明显的不同. 本文 ...

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

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

  10. osgi笔记

    Bundle-Classpath可以实现内嵌jar. 一个Bundle的Activator不需要进行Export 一个Package中的类被两个ClassLoader加载,包中的Private cla ...

随机推荐

  1. 数据库.bak文件还原报错的处理办法

    今天从网上下了个Demo,里面有个.bak文件,就试着还原了一下,结果发现报了错.是了两种方式导入,都不行. 最终找到了解决办法: 可以直接用sql语句对.bak文件进行还原. RESTORE DAT ...

  2. heap c++ 操作 大顶堆、小顶堆

    在C++中,虽然堆不像 vector, set 之类的有已经实现的数据结构,但是在 algorithm.h 中实现了一些相关的模板函数.下面是一些示例应用 http://www.cplusplus.c ...

  3. 第一个c++程序

    #include <iostream> using namespace std; int main(int argc, const char * argv[]) { //cin接收键盘输入 ...

  4. backbone框架思路

    Backbone是MVC框架.如何使用这个框架来简化前端过程呢?作为一个初学者,虽然网上有它的官方文档,但是都是讲的一些方法,思路分析的却对初学者来说,看得晕乎乎的.现在就把自己对这个框架的理解记录在 ...

  5. js多种切换图片

    分享通过js实现多种图片切换特效,这里只有手动切换哦,自动效果需自写,效果地址:http://dwz.cn/1drD5u. 下载地址:http://***/download/index/52209 适 ...

  6. 修改Chrome临时文件位置

    通过目录链接实现. mklink /D "C:\Users\ljq\AppData\Local\Google\Chrome\User Data" z:\temp http://we ...

  7. Navicat Premium下sql导入中文乱码解决方案

    今天帮忙朋友找bug的时候,准备导入她数据库里面的数据,所以我就试图在mysql管理工具Navicat下面导入相应的mysql命令.结果发现导入的中文字符全部变成乱码,所以做了如下这种尝试: 在“连接 ...

  8. iOS进阶_地图定位

    一.定位步骤 1.Xcode自带地图,直接先引入头文件 #import <CoreLocation/CoreLocation.h> 2.CLLocation框架中的CLLocationMa ...

  9. Testng之使用@DataProvider注解做数据驱动【转】

    原文:http://www.jianshu.com/p/8e333a0ec42a 前两天学了一下@DataProvider,今天有时间总结一下.testng很强大,提供了很多注解,其中利用@DataP ...

  10. Strong name signature not valid for this assembly Microsoft.mshtml.dll

    Strong name signature not valid for this assembly Microsoft.mshtml.dll  http://social.msdn.microsoft ...