<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    gembin

    OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

    HBase, Hadoop, ZooKeeper, Cassandra

    Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

    There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

    About Me

     

    OSGi Service Platform Core Specification Release 4 - Package Admin Service Specification

    7.1 Introduction

    Bundles can export packages to other bundles. This exporting creates a dependency between the bundle exporting a package and the bundle using the package. When the exporting bundle is uninstalled or updated, a decision must be taken regarding any shared packages.
    The Package Admin service provides an interface to let the Management Agent make this decision.
    Bundles能輸出包到其他bundles,這個輸出將會在輸出bundle與引入bundle間發生一個依賴關系,當輸出bundle被卸載或更新 時,對相關的共享包必須做出一個決定(相應動作)。包管理服務提供了一個接口讓Management Agent來做這個決定。

    7.1.1 Essentials

    • Information – The Package Admin service must provide the sharing status of all packages. This should include information about the importing bundles and exporting bundle.
    • Policy – The Package Admin service must allow a management agent to provide a policy for package sharing when bundles are updated and uninstalled.
    • Minimal update – Only bundles that depend on the package that needs to be resolved should have to be restarted when packages are forced to be refreshed.

    • Information – 包管理服務必須提供所有包的共享狀態,這應該包括輸出bundle和引入bundle的相關信息。
    • Minimal update – 依賴于需要被解析的包的bundles應該在這些包被強制刷新的時候被重啟

    7.1.2 Entities

    • PackageAdmin – The interface that provides access to the internal Framework package sharing mechanism.
    • ExportedPackage – The interface provides package information and its sharing status.
    • RequiredBundle – The interfaces provides information about the bindings of required bundles.
    • Management Agent – A bundle that is provided by the Operator to implement an Operator specific policy.

    • PackageAdmin – 接口,提供了對框架內部包共享機制的訪問。
    • ExportedPackage – 接口,提供包的信息和包的共享狀態。
    • RequiredBundle – 接口,提供required bundles的綁定相關的信息
    • Management Agent – 一個bundle,由操作人員提供,用于實現操作人員指定的策略。



    7.1.3 Operation

    The Framework’s system bundle should provide a Package Admin service for the Management Agent. The Package Admin service must be registered under the org.osgi.service.packageadmin.PackageAdmin interface by the system bundle. It provides access to the internal structures of the Framework related to package sharing, fragments and required bundles. This is an optional singleton service, so at most one Package Admin service must be
    registered at any moment in time.
    框架的系統bundle應該為Management Agent提供一個包管理服務,包管理服務必須由系統bundle注冊在 org.osgi.service.packageadmin.PackageAdmin的接口名下,它提供對框架內部結構中關于包共享,片段和 required bundles的訪問。這是一個可選的單例服務,因此最多只有一個包管理服務被注冊。

    The Framework must always leave the package sharing intact for packages exported by a bundle that is uninstalled or updated. A Management Agent can then choose to force the framework to refresh these packages using the Package Admin service. A policy of always using the most current packages exported by installed bundles can be implemented with a Management Agent that watches Framework events for bundles being uninstalled or updated, and then refreshes the packages of those bundles using the Package Admin service.
    一個卸載或更新的bundle輸出的包,框架必須總是保證這些包沒有被使用,這時Management Agent就可以使用包管理服務選擇強制框架刷新這些包。總是使用安裝bundle輸出的通用包的策略可以被一個監聽卸載或更新bundle的框架事件的 Management Agent實現,然后使用包管理服務刷新那些bundles的包。

    7.2 Package Admin

    The Package Admin service is intended to allow a Management Agent to define the policy for managing package sharing. It provides methods for examining the status of the shared packages. It also allows the Management Agent to refresh the packages and stop and restart bundles as necessary.
    包管理服務允許一個Management Agent定義管理包共享的策略,它提供了檢查共享包的狀態的方法,也允許Management Agent刷新包,并在需要的時候停止和重啟bundles

    7.2.1 Package Sharing

    The PackageAdmin class provides the following methods:
    • getExportedPackage(String) – Returns an ExportedPackage object that provides information about the requested package. This information can be used to make the decision to refresh the package.
    • getExportedPackages(Bundle) – Returns a list of ExportedPackage objects for each package that the given bundle exports.
    • refreshPackages(Bundle[]) – The management agent may call this method to refresh the exported packages of the specified bundles. The actual work must happen asynchronously. The Framework must send a Framework.PACKAGES_REFRESHED when all packages have been refreshed.
    • resolveBundles(Bundle[]) – The Framework must attempt to resolve the given bundles.

    類PackageAdmin提供了一下方法:
    • getExportedPackage(String) – 返回一個提供了與requested package相關的信息的ExportedPackage對象,這個信息可以決定是否需要刷新包。
    • getExportedPackages(Bundle) – 返回一個ExportedPackage對象的列表,給定的bundle所輸出的包
    • refreshPackages(Bundle[]) – management agent可以調用這個方法去刷新指定的bundle輸出的包,這個動作必須是同步的。當所有包都被刷新后,框架必須發出一個 Framework.PACKAGES_REFRESHED事件。
    • resolveBundles(Bundle[]) – 框架必須嘗試解析給定的bundles

    7.2.2 Bundle Information

    There is only the Bundle interface in the Framework API while bundles can perform different roles in the Framework. The Package Admin service provides access to this structural information.
    • getBundle(Class) – Answer the bundle with the class loader that loaded the given class.
    • getBundles(String,String)– Find a the set of bundles with the given bundle symbolic name and that fall within the given version. If the version is null, all bundles with the given bundle symbolic name are returned.
    • getBundleType(Bundle) – Answer the type of the bundle. This is a bitmap of the different types. The following type is defined:
      • BUNDLE_TYPE_FRAGMENT– The bundle is a fragment.

    bundles可以在框架中扮演不同的角色,但是這些bundle都在來自一個接口Bundle,包管理服務提供了對這個結構信息的訪問:
    • getBundle(Class) – 查找一個bundle,這個bundle的classloader加載了這個給定的類
    • getBundles(String,String)– 查找一個bundle集合,通過給定的標記名和版本號,如果版本號是null,那么將返回給定的標記名的bundles
    • getBundleType(Bundle) – 查詢bundle的類型。定義了以下類型
      • BUNDLE_TYPE_FRAGMENT–bundle是個片段

    7.2.3 Fragments and Required Bundles

    The Package Admin service provides access to the network that is created by by requiring bundles and hosting fragments.
    • getFragments(Bundle) – Return an array of bundles that currently act as fragment to the given bundle. If there are no fragments attached, null must be returned.
    • getHosts(Bundle) – Return the bundle that acts as host to this fragment bundle. The given bundle should be an attached fragment bundle, otherwise null is returned.
    • getRequiredBundles(String) – Return an array of RequiredBundle objects that match the given name (or all of the given name is null). The RequiredBundle object provides structural information about a required bundle.

    包管理服務提供了對由需求bundle和主片段形成的關系網的訪問。
    • getFragments(Bundle) – 返回一個bundles的集合,這個集合中的bundles是給定bundle的片段,如果沒有片段,返回null
    • getHosts(Bundle) – 返回給定bundle的宿主bundle。這個給定的bundle應該是個片段,否則返回null。
    • getRequiredBundles(String) – 返回RequiredBundle對象的集合,這個集合匹配了給定的名字(bundle標記名),如果給定的名字是null,將返回所有required 的bundles。每一個RequiredBundle對象提供了對一個required的bundle的結構信息的描述。

    7.2.4 Exported Package

    Information about the shared packages is provided by the ExportedPackage objects. These objects provide detailed information about the bundles that import and export the package. This information can be used by a Management Agent to guide its decisions.
    與共享包相關的信息是由ExportedPackage對象提供的,這些ExportedPackage對象提供了引入包或輸出包的bundles的細節信息,這些信息可以被Management Agent用于參考它的決定。

    7.2.5 Refreshing Packages and Start Level Service

    Bundles may be stopped and later started when the refreshPackages(Bundle[]) method is called. If the Start Level Service is present, the stopping and starting of bundles must not violate the start level constraints. This implies that bundles with a higher start level must be stopped before bundles with a lower start level are stopped. Vice versa, bundles should not be started
    before all the bundles with a lower start level are started. See Startup Sequence on page 207.

    當調用refreshPackages(Bundle[])方法時,bundles可能會先停止,然后又啟動,如果設置了啟動級別服務,那么 bundles的停止和啟動必須不能違反啟動級別的限制,也就是說高啟動級別的bundles必須比低啟動級別的bundles先停止,低啟動級別的 bundles比高啟動級別的bundles先啟動。

    posted on 2008-05-09 18:00 gembin 閱讀(661) 評論(0)  編輯  收藏 所屬分類: OSGi

    導航

    統計

    常用鏈接

    留言簿(6)

    隨筆分類(440)

    隨筆檔案(378)

    文章檔案(6)

    新聞檔案(1)

    相冊

    收藏夾(9)

    Adobe

    Android

    AS3

    Blog-Links

    Build

    Design Pattern

    Eclipse

    Favorite Links

    Flickr

    Game Dev

    HBase

    Identity Management

    IT resources

    JEE

    Language

    OpenID

    OSGi

    SOA

    Version Control

    最新隨筆

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    free counters
    主站蜘蛛池模板: 亚洲色www永久网站| 亚洲国产成人久久| 久久国产精品成人片免费| 美国毛片亚洲社区在线观看| 久久精品国产精品亚洲艾| 狠狠亚洲婷婷综合色香五月排名| 两性刺激生活片免费视频| 免费无码VA一区二区三区 | 91精品成人免费国产| 国产成人亚洲合集青青草原精品| 久久久久久亚洲AV无码专区| 亚洲AV日韩精品久久久久久| 亚洲免费日韩无码系列| 亚洲一区二区高清| 免费在线观看黄网| 亚洲片一区二区三区| 国产精品亚洲视频| 亚洲一区无码中文字幕| 五月天网站亚洲小说| 亚洲自偷精品视频自拍| 亚洲天堂男人影院| 特黄特色大片免费| 中文字幕免费在线观看动作大片| 久久久久久国产a免费观看不卡| a毛片在线还看免费网站| 中文字幕免费视频一| 久草视频免费在线| 国产jizzjizz视频全部免费| 国产亚洲色婷婷久久99精品91| 亚洲综合无码AV一区二区| 91亚洲国产成人久久精品| 黄页免费视频播放在线播放| 最近中文字幕大全免费版在线| 91禁漫免费进入| 亚洲第一网站男人都懂| 亚洲精品电影天堂网| 亚洲国产av玩弄放荡人妇| 18女人水真多免费高清毛片| 国产一级淫片视频免费看| 亚洲精品人成在线观看| 国产亚洲精品国产福利在线观看|