2007-06-28
BundleContext
关键字: BundleContext
org.osgi.framework.BundleContext
A bundle's execution context within the Framework. The context is used to grant access to other methods so that this bundle can interact with the Framework.
BundleContext methods allow a bundle to:
A BundleContext object will be created and provided to the bundle associated with this context when it is started using the BundleActivator.start method. The same BundleContext object will be passed to the bundle associated with this context when it is stopped using the BundleActivator.stop method. A BundleContext object is generally for the private use of its associated bundle and is not meant to be shared with other bundles in the OSGi environment.
The Bundle object associated with a BundleContext object is called the context bundle.
The BundleContext object is only valid during the execution of its context bundle; that is, during the period from when the context bundle is in the STARTING, STOPPING, and ACTIVE bundle states. If the BundleContext object is used subsequently, an IllegalStateException must be thrown. The BundleContext object must never be reused after its context bundle is stopped.
The Framework is the only entity that can create BundleContext objects and they are only valid within the Framework that created them.
@version $Revision: 1.17 $
A bundle's execution context within the Framework. The context is used to grant access to other methods so that this bundle can interact with the Framework.
BundleContext methods allow a bundle to:
- Subscribe to events published by the Framework.
Register service objects with the Framework service registry.
Retrieve ServiceReferences from the Framework service registry.
Get and release service objects for a referenced service.
Install new bundles in the Framework.
Get the list of bundles installed in the Framework.
Get the Bundle object for a bundle.
Create File objects for files in a persistent storage area provided for the bundle by the Framework.
A BundleContext object will be created and provided to the bundle associated with this context when it is started using the BundleActivator.start method. The same BundleContext object will be passed to the bundle associated with this context when it is stopped using the BundleActivator.stop method. A BundleContext object is generally for the private use of its associated bundle and is not meant to be shared with other bundles in the OSGi environment.
The Bundle object associated with a BundleContext object is called the context bundle.
The BundleContext object is only valid during the execution of its context bundle; that is, during the period from when the context bundle is in the STARTING, STOPPING, and ACTIVE bundle states. If the BundleContext object is used subsequently, an IllegalStateException must be thrown. The BundleContext object must never be reused after its context bundle is stopped.
The Framework is the only entity that can create BundleContext objects and they are only valid within the Framework that created them.
@version $Revision: 1.17 $
- 09:55
- 浏览 (369)
- 评论 (0)
- 分类: Eclipse/plugin/rcp
- 相关推荐
发表评论
- 浏览: 54533 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
我的相册
动力
共 6 张
共 6 张
最新评论
-
一个数据库连接Java工具类 ...
不错,加油,能写成工具类就好了。
-- by dd2086 -
Hibernate和Access
我指的是方法一
-- by 黑暗浪子 -
Hibernate和Access
我测试一下,如果连接的是*.asa文件,好像就报"can't open conn ...
-- by 黑暗浪子 -
计算机/软件领域中的名人
Bruce Eckel和其他几位根本不是一个层次的人物。Marin Fowler ...
-- by turing -
《夜袭》和战争
电影拍的不好,有辱历史!
-- by ken1984






评论排行榜