• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JiveProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: makePubsubPayload

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
private String makePubsubPayload(PushMessage.Action action, AppEntity ae,
                                 MMXTopicId topic, Date pubDate, Node node) {
  String pubsubPayload;
  Map<String, String> context = makeContext(ae, topic, pubDate, node);
  String body = JiveProperties.getInstance().getProperty(
      MMXConfigKeys.PUBSUB_NOTIFICATION_BODY, BODY);
  if (body != null) {
    body = Utils.eval(body, context).toString();
  }
  if (action == PushMessage.Action.PUSH) {
    // Push notification payload
    String title = JiveProperties.getInstance().getProperty(
        MMXConfigKeys.PUBSUB_NOTIFICATION_TITLE, null);
    if (title != null) {
      title = Utils.eval(title, context).toString();
    }
    pubsubPayload = GsonData.getGson().toJson(new PubSubNotification(topic,
        pubDate, title, body));
  } else {
    // Wakeup (silent) notification payload
    pubsubPayload = GsonData.getGson().toJson(new PubSubNotification(topic,
        pubDate, body));
  }
  return pubsubPayload;
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:26,代码来源:PubSubWakeupProvider.java


示例2: setClusteringEnabled

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
/**
 * Sets true if clustering support is enabled. An attempt to start or join
 * an existing cluster will be attempted in the service was enabled. On the
 * other hand, if disabled then this JVM will leave or stop the cluster.
 *
 * @param enabled if clustering support is enabled.
 */
public static void setClusteringEnabled(boolean enabled) {
    if (enabled) {
        // Check that clustering is not already enabled and we are already in a cluster
        if (isClusteringEnabled() && isClusteringStarted()) {
            return;
        }
    }
    else {
        // Check that clustering is disabled
        if (!isClusteringEnabled()) {
            return;
        }
    }
    JiveGlobals.setXMLProperty(CLUSTER_PROPERTY_NAME, Boolean.toString(enabled));
    if (!enabled) {
        shutdown();
    }
    else {
        // Reload Jive properties. This will ensure that this nodes copy of the
        // properties starts correct.
       JiveProperties.getInstance().init();
       startup();
    }
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:32,代码来源:ClusterManager.java


示例3: MonitoringPlugin

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
public MonitoringPlugin() {

        // Enable AWT headless mode so that stats will work in headless environments.
        System.setProperty("java.awt.headless", "true");

        picoContainer = new DefaultPicoContainer();
        picoContainer.registerComponentInstance(TaskEngine.getInstance());
        picoContainer.registerComponentInstance(JiveProperties.getInstance());

        // Stats and Graphing classes
        picoContainer.registerComponentImplementation(StatsEngine.class);
        picoContainer.registerComponentImplementation(GraphEngine.class);
        picoContainer.registerComponentImplementation(StatisticsModule.class);
        picoContainer.registerComponentImplementation(StatsViewer.class,
            getStatsViewerImplementation());

        // Archive classes
        picoContainer.registerComponentImplementation(ConversationManager.class);
        picoContainer.registerComponentImplementation(ArchiveInterceptor.class);
        picoContainer.registerComponentImplementation(GroupConversationInterceptor.class);
        picoContainer.registerComponentImplementation(ArchiveSearcher.class);
        picoContainer.registerComponentImplementation(ArchiveIndexer.class);
    }
 
开发者ID:coodeer,项目名称:g3server,代码行数:24,代码来源:MonitoringPlugin.java


示例4: authenticate

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
public void authenticate(String userName, String password) throws UnauthorizedException, ConnectionException, InternalUnauthenticatedException {
	if (auditPlugin == null) {
		auditPlugin = (AuditPlugin)(XMPPServer.getInstance().getPluginManager().getPlugin(JiveProperties.getInstance().get(AUDIT_PLUGIN_PROPERTY_NAME)));
	}

       boolean doAudit = false;
       if (auditPlugin == null && !hasWarnedNoAuditing) {
           System.out.println("SuperuserAuthProvider.authenticate() Warning: audit plugin not found.");

           hasWarnedNoAuditing = true;
       } else {
           doAudit = JiveProperties.getInstance().getBooleanProperty("com.surevine.chat.openfire.auth.logSuperuserLogins");
       }

       if (!password.equals(JiveProperties.getInstance().get(PASSWORD_PROPERTY))) {
   		if (doAudit) {
               auditPlugin.getAuditMessageFactory().createAuditMessageForSULogin(userName, false);
           }

   		throw new UnauthorizedException("The super user provided an incorrect password");
   	}

       if (doAudit) {
   		auditPlugin.getAuditMessageFactory().createAuditMessageForSULogin(userName, true);
       }
}
 
开发者ID:surevine,项目名称:openfire-superuser-auth-provider,代码行数:27,代码来源:SuperuserAuthProvider.java


示例5: getIntProperty

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
private static int getIntProperty(String name, int defValue) {
  String value;
  if ((value = JiveProperties.getInstance().getProperty(name, null)) == null) {
    return defValue;
  }
  return Integer.parseInt(value);
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:8,代码来源:APNSConnectionPoolImpl.java


示例6: xmlPropertySet

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
@Override
public void xmlPropertySet(String property, Map<String, Object> params) {
    if (ClusterManager.CLUSTER_PROPERTY_NAME.equals(property)) {
        if (Boolean.parseBoolean((String) params.get("value"))) {
            // Reload/sync all Jive properties
            JiveProperties.getInstance().init();
            ClusterManager.startup();
        } else {
            ClusterManager.shutdown();
        }
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:13,代码来源:ClusterManager.java


示例7: MonitoringPlugin

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
public MonitoringPlugin() {
    instance = this;

    // Enable AWT headless mode so that stats will work in headless
    // environments.
    System.setProperty("java.awt.headless", "true");

    picoContainer = new DefaultPicoContainer();
    picoContainer.registerComponentInstance(TaskEngine.getInstance());
    picoContainer.registerComponentInstance(JiveProperties.getInstance());

    // Stats and Graphing classes
    picoContainer.registerComponentImplementation(StatsEngine.class);
    picoContainer.registerComponentImplementation(GraphEngine.class);
    picoContainer.registerComponentImplementation(StatisticsModule.class);
    picoContainer.registerComponentImplementation(StatsViewer.class,
            getStatsViewerImplementation());

    // Archive classes
    picoContainer
            .registerComponentImplementation(ConversationManager.class);
    picoContainer.registerComponentImplementation(ArchiveInterceptor.class);
    picoContainer
            .registerComponentImplementation(GroupConversationInterceptor.class);
    picoContainer.registerComponentImplementation(ArchiveSearcher.class);
    picoContainer.registerComponentImplementation(ArchiveIndexer.class);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:28,代码来源:MonitoringPlugin.java


示例8: xmlPropertySet

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
public void xmlPropertySet(String property, Map<String, Object> params) {
       if (ClusterManager.CLUSTER_PROPERTY_NAME.equals(property)) {
           if (Boolean.parseBoolean((String) params.get("value"))) {
               // Reload/sync all Jive properties
           	JiveProperties.getInstance().init();
           	ClusterManager.startup();
           } else {
           	ClusterManager.shutdown();
           }
       }
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:12,代码来源:ClusterManager.java


示例9: MonitoringPlugin

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
public MonitoringPlugin() {
	instance = this;

	// Enable AWT headless mode so that stats will work in headless
	// environments.
	System.setProperty("java.awt.headless", "true");

	picoContainer = new DefaultPicoContainer();
	picoContainer.registerComponentInstance(TaskEngine.getInstance());
	picoContainer.registerComponentInstance(JiveProperties.getInstance());

	// Stats and Graphing classes
	picoContainer.registerComponentImplementation(StatsEngine.class);
	picoContainer.registerComponentImplementation(GraphEngine.class);
	picoContainer.registerComponentImplementation(StatisticsModule.class);
	picoContainer.registerComponentImplementation(StatsViewer.class,
			getStatsViewerImplementation());

	// Archive classes
	picoContainer
			.registerComponentImplementation(ConversationManager.class);
	picoContainer.registerComponentImplementation(ArchiveInterceptor.class);
	picoContainer
			.registerComponentImplementation(GroupConversationInterceptor.class);
	picoContainer.registerComponentImplementation(ArchiveSearcher.class);
	picoContainer.registerComponentImplementation(ArchiveIndexer.class);
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:28,代码来源:MonitoringPlugin.java


示例10: CASAuthProvider

import org.jivesoftware.util.JiveProperties; //导入依赖的package包/类
/**
 * Constructs a <code>CASAuthProvider</code> using configuration from the
 * {@link JiveProperties} singleton.
 */
public CASAuthProvider() {
	JiveProperties jiveProperties = JiveProperties.getInstance();
	CASAuthProviderConfig config = new CASAuthProviderConfig(jiveProperties);
	CASAuthTicketValidatorFactory factory = new CASAuthTicketValidatorFactory();
	ticketValidator = factory.createCASAuthTicketValidator(config);
}
 
开发者ID:surevine,项目名称:openfire-cas-auth-provider,代码行数:11,代码来源:CASAuthProvider.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XmlAccessorFactory类代码示例发布时间:2022-05-23
下一篇:
Java Author类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap