2007-06-28

Bundle

关键字: Bundle
org.osgi.framework.Bundle

An installed bundle in the Framework.

A Bundle object is the access point to define the lifecycle of an installed bundle. Each bundle installed in the OSGi environment must have an associated Bundle object.

A bundle must have a unique identity, a long, chosen by the Framework. This identity must not change during the lifecycle of a bundle, even when the bundle is updated. Uninstalling and then reinstalling the bundle must create a new unique identity.

A bundle can be in one of six states:

    UNINSTALLED
    INSTALLED
    RESOLVED
    STARTING
    STOPPING
    ACTIVE

Values assigned to these states have no specified ordering; they represent bit values that may be ORed together to determine if a bundle is in one of the valid states.

A bundle should only execute code when its state is one of STARTING,ACTIVE, or STOPPING. An UNINSTALLED bundle can not be set to another state; it is a zombie and can only be reached because references are kept somewhere.

The Framework is the only entity that is allowed to create Bundle objects, and these objects are only valid within the Framework that created them.

@version
$Revision: 1.33 $
评论
发表评论

您还没有登录,请登录后发表评论

James Zhao
搜索本博客
我的相册
229a73b1-3463-4fe5-882f-582753f6ae58-thumb
动力
共 6 张
存档
最新评论