当前位置: 首页>>代码示例>>Java>>正文


Java PluginManager.start方法代码示例

本文整理汇总了Java中org.jivesoftware.openfire.container.PluginManager.start方法的典型用法代码示例。如果您正苦于以下问题:Java PluginManager.start方法的具体用法?Java PluginManager.start怎么用?Java PluginManager.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jivesoftware.openfire.container.PluginManager的用法示例。


在下文中一共展示了PluginManager.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import org.jivesoftware.openfire.container.PluginManager; //导入方法依赖的package包/类
public void start() {
    try {
        initialize();

        // Create PluginManager now (but don't start it) so that modules may use it
        File pluginDir = new File(openfireHome, "plugins");
        pluginManager = new PluginManager(pluginDir);

        // If the server has already been setup then we can start all the server's modules
        if (!setupMode) {
            verifyDataSource();
            // First load all the modules so that modules may access other modules while
            // being initialized
            loadModules();
            // Initize all the modules
            initModules();
            // Start all the modules
            startModules();
        }
        // Initialize statistics
        ServerTrafficCounter.initStatistics();

        // Load plugins (when in setup mode only the admin console will be loaded)
        pluginManager.start();

        // Log that the server has been started
        String startupBanner = LocaleUtils.getLocalizedString("short.title") + " " + xmppServerInfo.getVersion().getVersionString() +
                " [" + JiveGlobals.formatDateTime(new Date()) + "]";
        logger.info(startupBanner);
        System.out.println(startupBanner);

        started = true;
        
        // Notify server listeners that the server has been started
        for (XMPPServerListener listener : listeners) {
            listener.serverStarted();
        }
    }
    catch (Exception e) {
        e.printStackTrace();
        logger.error(e.getMessage(), e);
        System.out.println(LocaleUtils.getLocalizedString("startup.error"));
        shutdownServer();
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:46,代码来源:XMPPServer.java

示例2: start

import org.jivesoftware.openfire.container.PluginManager; //导入方法依赖的package包/类
public void start() {
    try {
        initialize();

        startDate = new Date();
        // Store server info
        xmppServerInfo = new XMPPServerInfoImpl(name, host, version, startDate, getConnectionManager());

        // Create PluginManager now (but don't start it) so that modules may use it
        File pluginDir = new File(openfireHome, "plugins");
        pluginManager = new PluginManager(pluginDir);

        // If the server has already been setup then we can start all the server's modules
        if (!setupMode) {
            verifyDataSource();
            // First load all the modules so that modules may access other modules while
            // being initialized
            loadModules();
            // Initize all the modules
            initModules();
            // Start all the modules
            startModules();
        }
        // Initialize statistics
        ServerTrafficCounter.initStatistics();

        // Load plugins (when in setup mode only the admin console will be loaded)
        pluginManager.start();

        // Log that the server has been started
        String startupBanner = LocaleUtils.getLocalizedString("short.title") + " " + version.getVersionString() +
                " [" + JiveGlobals.formatDateTime(new Date()) + "]";
        Log.info(startupBanner);
        System.out.println(startupBanner);

        started = true;
        
        // Notify server listeners that the server has been started
        for (XMPPServerListener listener : listeners) {
            listener.serverStarted();
        }
    }
    catch (Exception e) {
        e.printStackTrace();
        Log.error(e.getMessage(), e);
        System.out.println(LocaleUtils.getLocalizedString("startup.error"));
        shutdownServer();
    }
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:50,代码来源:XMPPServer.java

示例3: start

import org.jivesoftware.openfire.container.PluginManager; //导入方法依赖的package包/类
public void start() {
    try {
        initialize();

        // Create PluginManager now (but don't start it) so that modules may use it
        File pluginDir = new File(openfireHome, "plugins");
        pluginManager = new PluginManager(pluginDir);

        // If the server has already been setup then we can start all the server's modules
        if (!setupMode) {
            verifyDataSource();
            // First load all the modules so that modules may access other modules while
            // being initialized
            loadModules();
            // Initize all the modules
            initModules();
            // Start all the modules
            startModules();
        }
        // Initialize statistics
        ServerTrafficCounter.initStatistics();

        // Load plugins (when in setup mode only the admin console will be loaded)
        pluginManager.start();

        // Log that the server has been started
        String startupBanner = LocaleUtils.getLocalizedString("short.title") + " " + version.getVersionString() +
                " [" + JiveGlobals.formatDateTime(new Date()) + "]";
        Log.info(startupBanner);
        System.out.println(startupBanner);

        started = true;
        
        // Notify server listeners that the server has been started
        for (XMPPServerListener listener : listeners) {
            listener.serverStarted();
        }
    }
    catch (Exception e) {
        e.printStackTrace();
        Log.error(e.getMessage(), e);
        System.out.println(LocaleUtils.getLocalizedString("startup.error"));
        shutdownServer();
    }
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:46,代码来源:XMPPServer.java


注:本文中的org.jivesoftware.openfire.container.PluginManager.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。