本文整理汇总了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;未经允许,请勿转载。 |
请发表评论