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


Java AdminConsolePlugin类代码示例

本文整理汇总了Java中org.jivesoftware.openfire.container.AdminConsolePlugin的典型用法代码示例。如果您正苦于以下问题:Java AdminConsolePlugin类的具体用法?Java AdminConsolePlugin怎么用?Java AdminConsolePlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: restartHTTPServer

import org.jivesoftware.openfire.container.AdminConsolePlugin; //导入依赖的package包/类
/**
 * Restarts the HTTP server only when running in stand alone mode. The restart
 * process will be done in another thread that will wait 1 second before doing
 * the actual restart. The delay will give time to the page that requested the
 * restart to fully render its content.
 */
public void restartHTTPServer() {
    Thread restartThread = new Thread() {
        @Override
        public void run() {
            if (isStandAlone()) {
                // Restart the HTTP server manager. This covers the case
                // of changing the ports, as well as generating self-signed certificates.

                // Wait a short period before shutting down the admin console.
                // Otherwise, this page won't render properly!
                try {
                    Thread.sleep(1000);
                    ((AdminConsolePlugin) pluginManager.getPlugin("admin")).shutdown();
                    ((AdminConsolePlugin) pluginManager.getPlugin("admin")).startup();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    };
    restartThread.setContextClassLoader(loader);
    restartThread.start();
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:30,代码来源:XMPPServer.java

示例2: restartHTTPServer

import org.jivesoftware.openfire.container.AdminConsolePlugin; //导入依赖的package包/类
/**
  * Restarts the HTTP server only when running in stand alone mode. The restart
  * process will be done in another thread that will wait 1 second before doing
  * the actual restart. The delay will give time to the page that requested the
  * restart to fully render its content.
  */
 public void restartHTTPServer() {
     Thread restartThread = new Thread() {
         @Override
public void run() {
             if (isStandAlone()) {
                 // Restart the HTTP server manager. This covers the case
                 // of changing the ports, as well as generating self-signed certificates.

                 // Wait a short period before shutting down the admin console.
                 // Otherwise, this page won't render properly!
                 try {
                     Thread.sleep(1000);
                     ((AdminConsolePlugin) pluginManager.getPlugin("admin")).shutdown();
                     ((AdminConsolePlugin) pluginManager.getPlugin("admin")).startup();
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
             }
         }
     };
     restartThread.setContextClassLoader(loader);
     restartThread.start();
 }
 
开发者ID:coodeer,项目名称:g3server,代码行数:30,代码来源:XMPPServer.java

示例3: destroyPlugin

import org.jivesoftware.openfire.container.AdminConsolePlugin; //导入依赖的package包/类
public void destroyPlugin() {
    PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
    ((AdminConsolePlugin) pluginManager.getPlugin("admin")
            ).getContexts().removeHandler(context);
    try {
        context.stop();
    }
    catch (Exception e) {
        Log.error(e);
    }
    context = null;
}
 
开发者ID:igniterealtime,项目名称:Fastpath-webchat,代码行数:13,代码来源:WebClientPlugin.java


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