本文整理了Java中org.jivesoftware.openfire.XMPPServer.getPrivateStorage()
方法的一些代码示例,展示了XMPPServer.getPrivateStorage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMPPServer.getPrivateStorage()
方法的具体详情如下:
包路径:org.jivesoftware.openfire.XMPPServer
类名称:XMPPServer
方法名:getPrivateStorage
[英]Returns the PrivateStorage
registered with this server. The PrivateStorage
was registered with the server as a module while starting up the server.
[中]返回在此服务器上注册的PrivateStorage
。启动服务器时,PrivateStorage
已作为模块注册到服务器。
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
privateStorage = server.getPrivateStorage();
}
代码示例来源:origin: igniterealtime/Openfire
public PrivateStorage getPrivateStore() {
return getXMPPServer().getPrivateStorage();
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
privateStorage = server.getPrivateStorage();
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
public PrivateStorage getPrivateStore() {
return getXMPPServer().getPrivateStorage();
}
代码示例来源:origin: net.gltd.gtms/gtmsutil
public static void saveToPrivateStorage(String username, Element element) {
StringUtil.validateString(username);
Util.validateNonNullObject(element);
XMPPServer.getInstance().getPrivateStorage().add(username, element);
}
代码示例来源:origin: net.gltd.gtms/gtmsutil
public static Document retrieveFromPrivateStorage(String username) throws RegistrationNotFoundException {
Document result = null;
if (XMPPServer.getInstance().getPrivateStorage().isEnabled()) {
Element foundElement = XMPPServer.getInstance().getPrivateStorage()
.get(username, ProfilerUtil.getSearchElement("<gtx-profile xmlns=\"http://gltd.net/protocol/gtx/profile\"></gtx-profile>"));
System.out.println(foundElement.asXML());
if (XmlUtil.elementSize(foundElement) > 0) {
result = DocumentHelper.createDocument(foundElement.createCopy());
} else {
throw new RegistrationNotFoundException("No Private Data found for user " + username);
}
} else {
throw new RegistrationNotFoundException("Private Storage is disabled");
}
return result;
}
代码示例来源:origin: net.gltd.gtms/gtmsutil
public static Document getGtxProfile(String username) throws RegistrationNotFoundException {
Document result = null;
if (XMPPServer.getInstance().getPrivateStorage().isEnabled()) {
Element foundElement = XMPPServer.getInstance().getPrivateStorage().get(username, ProfilerUtil.getGtxProfileSearchElement());
if (XmlUtil.elementSize(foundElement) > 0) {
result = DocumentHelper.createDocument(foundElement.createCopy());
} else {
throw new RegistrationNotFoundException("No Private Data found for user " + username);
}
} else {
throw new RegistrationNotFoundException("Private Storage is disabled");
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!