亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? modulemanager.java

?? OSGI 的 源碼實(shí)現(xiàn),采用JAVA書寫
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * ModuleLoader - A generic, policy-driven class loader. * Copyright (c) 2004, Richard S. Hall * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *   * Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer. *   * Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in *     the documentation and/or other materials provided with the *     distribution. *   * Neither the name of the ungoverned.org nor the names of its *     contributors may be used to endorse or promote products derived *     from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Contact: Richard S. Hall (heavy@ungoverned.org) * Contributor(s): ***/package org.ungoverned.moduleloader;import java.util.*;/** * <p> * The <tt>ModuleManager</tt> class is the core facility for defining a * re-usable, policy-driven class loader for applications that require * flexible class loading mechanisms. The <tt>ModuleManager</tt> is not * class loader itself, but it supports the concept of a * <a href="Module.html"><tt>Module</tt></a>, * which is a unit of organization for application classes and resources. * The <tt>ModuleManager</tt> has only a handful of methods that allow * an application to add, remove, reset, and query modules; the intent * is to place as few assumptions in the <tt>ModuleManager</tt> as possible. * </p> * <p> * The idea is simple, allow the application to map itself into modules * however it sees fit and let the <tt>ModuleManager</tt> assume the * responsibility of managing the modules and loading classes and resources * from them as necessary via <a href="ModuleClassLoader.html"><tt>ModuleClassLoader</tt></a>s * that are associated with each module. In order to achieve this goal, though, the * <tt>ModuleManager</tt> must make at least one assumption on behalf of * the application. This assumption is that the loading of classes and resources * from the available modules must happen using a search algorithm * that is particular to the application itself. As a result of this assumption, * the <tt>ModuleManager</tt> requires that the application provide a concrete * implementation of the <a href="SearchPolicy.html"><tt>SearchPolicy</tt></a> * interface. * </p> * <p> * The search policy allows the <tt>ModuleLoader</tt> to let applications inject * their own particular class loading policies, without dictating strict or * constraining base assumptions. Of course, it is likely that many applications * will use the same or very similar search policies. Because of this, another * goal of the <tt>ModuleLoader</tt> approach is to foster a common library of * search policies that applications are free to use or customize as they see * fit. These common search policies are analagous to patterns, where each search * policy is viewable as a <i>class loading pattern</i>. Some initial search * policies included with the <tt>ModuleLoader</tt> are * <a href="search/ExhaustiveSearchPolicy.html"><tt>ExhaustiveSearchPolicy</tt></a>, * <a href="search/SelfContainedSearchPolicy.html"><tt>SelfContainedSearchPolicy</tt></a>, and * <a href="search/ImportSearchPolicy.html"><tt>ImportSearchPolicy</tt></a>. * </p> * <p> * Due to the fact that class loaders are tied to security and resource loading, * the search policy alone is not sufficient for the <tt>ModuleLoader</tt> to * perform its function. To fulfill these other purposes, the <tt>ModuleLoader</tt> * introduces another policy interface, called the <a href="URLPolicy.html"><tt>URLPolicy</tt></a>. * The <tt>URLPolicy</tt> allows the application to inject its particular policy * for to purposes: * </p> * <ol> *   <li>Creating the <tt>URL</tt> associated with loading a resource, such as *       the <tt>URL</tt> returned from a call to <tt>Class.getResource()</tt>. *   </li> *   <li>Creating the <tt>URL</tt> that will be associated with a class's *       <tt>CodeSource</tt> when defining the class for purposes of security *       and assigning permissions. *   </li> * </ol> * <p> * The <tt>ModuleLoader</tt> defines a default <tt>URLPolicy</tt>, called * <a href="DefaultURLPolicy.html"><tt>DefaultURLPolicy</tt></a>, that provides * a simple <tt>URLStreamHandler</tt> for accessing resources inside of modules * and that returns <tt>null</tt> for the <tt>CodeSource</tt> <tt>URL</tt>. * Applications only need to supply their own <tt>URLPolicy</tt> if the default * one does not provide the appropriate behavior. * </p> * <p> * It is possible for an application to create multiple instances of the * <tt>ModuleManager</tt> within a single JVM, but it is not possible to * share modules across multiple <tt>ModuleManager</tt>s. A given <tt>ModuleManager</tt> * can only have one <tt>SelectionPolicy</tt> and one <tt>URLPolicy</tt>. * </p> * @see org.ungoverned.moduleloader.Module * @see org.ungoverned.moduleloader.ModuleClassLoader * @see org.ungoverned.moduleloader.SearchPolicy * @see org.ungoverned.moduleloader.URLPolicy * @see org.ungoverned.moduleloader.DefaultURLPolicy**/public class ModuleManager{    private List m_moduleList = new ArrayList();    private Map m_moduleMap = new HashMap();    private SearchPolicy m_searchPolicy = null;    private URLPolicy m_urlPolicy = null;    private ModuleListener[] m_listeners = null;    private static final ModuleListener[] m_noListeners = new ModuleListener[0];    /**     * <p>     * Constructs a <tt>ModuleManager</tt> instance using the specified     * search policy and the default <tt>URL</tt> policy.     * </p>     * @param searchPolicy the search policy that the instance should use.     * @see org.ungoverned.moduleloader.SearchPolicy    **/    public ModuleManager(SearchPolicy searchPolicy)    {        this(searchPolicy, null);    }    /**     * <p>     * Constructs a <tt>ModuleManager</tt> instance using the specified     * search policy and the specified <tt>URL</tt> policy.     * </p>     * @param searchPolicy the search policy that the instance should use.     * @param urlPolicy the <tt>URL</tt> policy that the instance should use.     * @see org.ungoverned.moduleloader.SearchPolicy     * @see org.ungoverned.moduleloader.URLPolicy    **/    public ModuleManager(SearchPolicy searchPolicy, URLPolicy urlPolicy)    {        m_listeners = m_noListeners;        m_searchPolicy = searchPolicy;        m_searchPolicy.setModuleManager(this);        if (urlPolicy == null)        {            m_urlPolicy = new DefaultURLPolicy();        }        else        {            m_urlPolicy = urlPolicy;        }    }    /**     * <p>     * Returns the <tt>URL</tt> policy used by this instance.     * </p>     * @return the <tt>URL</tt> policy used by this instance.     * @see org.ungoverned.moduleloader.URLPolicy    **/    public URLPolicy getURLPolicy()    {        return m_urlPolicy;    }    /**     * <p>     * Returns the search policy used by this instance.     * </p>     * @return the search policy used by this instance.     * @see org.ungoverned.moduleloader.SearchPolicy    **/    public SearchPolicy getSearchPolicy()    {        return m_searchPolicy;    }    /**     * <p>     * Returns an array of all modules being managed by the     * <tt>ModuleManager</tt> instance. The array contains a snapshot of     * all modules in the <tt>ModuleManager</tt> at the time when this     * method was called.     * </p>     * @return an array of all modules being managed by the <tt>ModuleManager</tt>     *         instance.     * @see org.ungoverned.moduleloader.Module    **/    public synchronized Module[] getModules()    {        Module[] modules = new Module[m_moduleList.size()];        return (Module[]) m_moduleList.toArray(modules);    }    /**     * <p>     * Returns a module associated with the specified identifier.     * </p>     * @param id the identifier for the module to be retrieved.     * @return the module associated with the identifier or <tt>null</tt>.     * @see org.ungoverned.moduleloader.Module    **/    public synchronized Module getModule(String id)    {        return (Module) m_moduleMap.get(id);    }    /**     * <p>     * Adds a module to the module manager. The module will have the specified     * unique identifier, with the associated attributes, resource sources, and     * library sources. If the identifier is not unique, then an exception is     * thrown.     * </p>     * @param id the unique identifier of the new module.     * @param attributes an array of key-value attribute pairs to     *        associate with the module.     * @param resSources an array of <tt>ResourceSource</tt>s to associate     *        with the module.     * @param libSources an array of <tt>LibrarySource</tt>s to associate     *        with the module.     * @return the newly created module.     * @throws java.lang.IllegalArgumentException if the module identifier     *         is not unique.     * @see org.ungoverned.moduleloader.Module     * @see org.ungoverned.moduleloader.ResourceSource     * @see org.ungoverned.moduleloader.LibrarySource    **/    public Module addModule(String id, Object[][] attributes,        ResourceSource[] resSources, LibrarySource[] libSources)    {        Module module = null;        // Use a synchronized block instead of synchronizing the        // method, so we can fire our event outside of the block.        synchronized (this)        {            if (m_moduleMap.get(id) == null)            {                module = new Module(this, id, attributes, resSources, libSources);                m_moduleList.add(module);                m_moduleMap.put(id, module);            }            else            {                throw new IllegalArgumentException("Module ID must be unique.");            }        }        // Fire event here instead of inside synchronized block.        fireModuleAdded(module);        return module;    }    /**     * <p>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机精品视频一区二区三区| www.亚洲精品| 国产成人精品综合在线观看| 国产成人av福利| av在线不卡免费看| 日本一区二区三区久久久久久久久不| 日韩一区二区三区精品视频| 欧美一卡2卡3卡4卡| 国产精品日日摸夜夜摸av| 亚洲美女淫视频| 另类小说综合欧美亚洲| 成人免费三级在线| 欧美亚洲日本国产| 久久综合久久久久88| 亚洲图片另类小说| 精品一区二区三区免费播放| 成人免费视频播放| 日韩欧美高清dvd碟片| 亚洲国产精品v| 蜜臂av日日欢夜夜爽一区| av网站一区二区三区| 欧美一区二区三区不卡| 国产精品美女久久久久高潮| 日韩和的一区二区| 色综合天天综合网天天看片| 2023国产精品| 久久99在线观看| 欧美精品自拍偷拍动漫精品| 1024成人网| 国内不卡的二区三区中文字幕| 欧美最猛性xxxxx直播| 国产清纯白嫩初高生在线观看91 | 中文字幕精品三区| 奇米亚洲午夜久久精品| 精品国产免费久久 | 日韩不卡手机在线v区| 日韩欧美一级二级三级久久久| 精品一二三四区| 国产精品色哟哟网站| 日本黄色一区二区| 青青草97国产精品免费观看| 2023国产精品视频| 日本道精品一区二区三区| 石原莉奈在线亚洲二区| 久久久亚洲综合| 在线观看亚洲精品视频| 九九精品视频在线看| 亚洲欧美日韩中文播放| 91精品在线观看入口| av一区二区久久| 美女网站一区二区| 一二三四社区欧美黄| 国产丝袜在线精品| 91精品国产综合久久蜜臀| 99久久精品国产一区二区三区| 美女网站视频久久| 亚洲国产裸拍裸体视频在线观看乱了| 国产亚洲美州欧州综合国| 欧美日韩国产首页| 91丨porny丨最新| 国产在线日韩欧美| 日韩精品欧美成人高清一区二区| 国产精品免费久久久久| 日韩欧美在线1卡| 欧美视频你懂的| 一本久久综合亚洲鲁鲁五月天 | 免费看欧美女人艹b| 国产精品全国免费观看高清 | 在线观看日韩av先锋影音电影院| 人人狠狠综合久久亚洲| 中文字幕一区二区三区精华液| 欧美日韩成人高清| 91色porny在线视频| 精品亚洲aⅴ乱码一区二区三区| 国产精品国产三级国产有无不卡 | 亚洲国产日韩精品| 国产欧美日韩精品a在线观看| 91精品国产一区二区三区| 99re这里只有精品视频首页| 久久电影网电视剧免费观看| 亚洲444eee在线观看| 亚洲精品国产视频| 亚洲综合在线五月| 婷婷综合在线观看| 亚洲欧美一区二区三区极速播放| 国产精品久久久久久户外露出 | 精品国产99国产精品| 欧美一区二区不卡视频| 日韩欧美国产综合在线一区二区三区| 99精品在线观看视频| 99久久精品国产导航| 成人精品免费网站| 91美女视频网站| 在线精品视频免费播放| 欧洲一区二区三区免费视频| 欧美撒尿777hd撒尿| 欧美老人xxxx18| 91精品在线免费| 久久久蜜桃精品| 欧美经典一区二区| 亚洲欧洲日本在线| 亚洲精品视频在线| 五月激情丁香一区二区三区| 蜜臀av在线播放一区二区三区 | 国产一区二区精品久久| 国产成人免费在线观看不卡| 高清shemale亚洲人妖| 91伊人久久大香线蕉| 欧美日韩高清在线播放| 精品乱码亚洲一区二区不卡| 国产日韩欧美精品综合| 奇米影视一区二区三区| 欧美日韩一区二区三区免费看| 国产日韩亚洲欧美综合| 精品一区二区三区欧美| 9191久久久久久久久久久| 亚洲国产日韩综合久久精品| 国产成人在线看| 欧美日韩精品综合在线| 欧美国产精品一区| 蜜臀av一区二区在线观看| 91在线丨porny丨国产| 日韩一卡二卡三卡国产欧美| 亚洲永久精品大片| 经典三级在线一区| 欧美日韩视频不卡| 欧美激情自拍偷拍| 国产揄拍国内精品对白| 日韩亚洲欧美高清| 亚洲一级二级三级| 成人免费视频视频| 国产精品电影院| 国产69精品久久久久777| 日韩欧美国产电影| 日本不卡的三区四区五区| 欧美亚洲高清一区二区三区不卡| 国产精品久久久久久久久久免费看| 国模冰冰炮一区二区| 日韩二区在线观看| 国产一区二区三区在线观看精品| 日韩欧美国产电影| 风间由美一区二区三区在线观看| 欧美极品少妇xxxxⅹ高跟鞋 | 免费久久精品视频| 久久久久久一级片| 99视频热这里只有精品免费| 一区二区三区国产精华| 欧美日韩视频在线一区二区| 免费成人在线网站| 国产午夜精品美女毛片视频| 成人高清在线视频| 亚洲18色成人| 中文av一区特黄| 韩日欧美一区二区三区| 91精品福利在线一区二区三区 | 欧美日韩亚洲综合在线 | 国产欧美日韩另类视频免费观看| 日韩理论电影院| 国产传媒欧美日韩成人| 欧美性猛交xxxxxx富婆| 国产亚洲综合在线| 丝袜美腿亚洲一区| 欧美丝袜自拍制服另类| 日韩精品亚洲一区| 色悠久久久久综合欧美99| 国产亚洲综合在线| 国产自产高清不卡| 69av一区二区三区| 日韩黄色免费电影| 欧美日韩精品系列| 午夜精品爽啪视频| 色菇凉天天综合网| 亚洲欧美日韩中文播放| 91一区二区三区在线播放| 中文字幕国产一区| 成人久久18免费网站麻豆| 国产网红主播福利一区二区| 国产一区二区调教| 亚洲精品综合在线| 777色狠狠一区二区三区| 国产盗摄精品一区二区三区在线| 亚洲欧美在线视频| 欧美va亚洲va在线观看蝴蝶网| 久草精品在线观看| 国产精品久久久一区麻豆最新章节| 在线区一区二视频| 国产精品人成在线观看免费| 国产精品一二三四| 亚洲精品免费在线播放| www.日本不卡| 日本一区免费视频| 91一区二区在线观看| 亚洲成人综合视频| 精品日韩在线观看| 日韩欧美在线网站| 国产精品久久久久四虎| 久久综合色之久久综合| 久久久.com| 中文字幕一区三区| 国产盗摄一区二区三区|