本文整理了Java中org.jivesoftware.openfire.XMPPServer.getPubSubModule()
方法的一些代码示例,展示了XMPPServer.getPubSubModule()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMPPServer.getPubSubModule()
方法的具体详情如下:
包路径:org.jivesoftware.openfire.XMPPServer
类名称:XMPPServer
方法名:getPubSubModule
[英]Returns the PubSubModule
registered with this server. The PubSubModule
was registered with the server as a module while starting up the server.
[中]返回在此服务器上注册的PubSubModule
。启动服务器时,PubSubModule
已作为模块注册到服务器。
代码示例来源:origin: igniterealtime/Openfire
public PubSubInfo()
{
super( XMPPServer.getInstance().getPubSubModule() );
}
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public Iterator<String> getFeatures(String name, String node, JID senderJID) {
if (node == null) {
PubSubModule pubsub = XMPPServer.getInstance().getPubSubModule();
return pubsub.getFeatures(null, null, senderJID);
} else {
List<String> features = new LinkedList<>();
features.add("http://jabber.org/protocol/pubsub");
return features.iterator();
}
}
代码示例来源:origin: igniterealtime/Openfire
/**
* Implements ServerFeaturesProvider to include all supported XEP-0060 features
* in the server's disco#info result (as per section 4 of XEP-0163).
*/
@Override
public Iterator<String> getFeatures() {
Iterator<String> it = XMPPServer.getInstance().getPubSubModule().getFeatures(null, null, null);
ArrayList<String> features = new ArrayList<>();
while (it.hasNext()) {
features.add(it.next());
}
// Auto Creation of nodes is supported in PEP
features.add("http://jabber.org/protocol/pubsub#auto-create");
return features.iterator();
}
代码示例来源:origin: igniterealtime/Openfire
public Node getNode()
{
if (node == null)
node = XMPPServer.getInstance().getPubSubModule().getNode(nodeId);
return node;
}
代码示例来源:origin: igniterealtime/Openfire
public PubSubServiceInfo(PubSubService pubSubService) {
if (pubSubService == null) {
throw new IllegalArgumentException("Argument 'pubSubService' cannot be null.");
}
this.pubSubService = pubSubService;
xmppServer = XMPPServer.getInstance();
pubSubModule = xmppServer.getPubSubModule();
groupManager = GroupManager.getInstance();
userManager = xmppServer.getUserManager();
}
代码示例来源:origin: igniterealtime/Openfire
public PubSubService getService()
{
if (XMPPServer.getInstance().getPubSubModule().getServiceID().equals(serviceId))
return XMPPServer.getInstance().getPubSubModule();
else
{
PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
return serviceMgr.hasCachedService(new JID(serviceId)) ? serviceMgr.getPEPService(serviceId) : null;
}
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public Iterator<Element> getIdentities(String name, String node, JID senderJID) {
String recipientJID = XMPPServer.getInstance().createJID(name, null, true).toBareJID();
PEPService pepService = pepServiceManager.getPEPService(recipientJID);
if (node != null && pepService != null) {
Node pubNode = pepService.getNode(node);
if (pubNode == null) return null;
// Answer the identity of a given node
Element identity = DocumentHelper.createElement("identity");
identity.addAttribute("category", "pubsub");
identity.addAttribute("type", pubNode.isCollectionNode() ? "collection" : "leaf");
List<Element> identities = new LinkedList<>();
identities.add(identity);
return identities.iterator();
} else if (node != null) {
return null;
} else {
PubSubModule pubsub = XMPPServer.getInstance().getPubSubModule();
return pubsub.getIdentities(null, null, senderJID);
}
}
代码示例来源:origin: igniterealtime/Openfire
/**
* Returns the {@link LeafNode} where this item was published.
*
* @return the leaf node where this item was published.
*/
public LeafNode getNode() {
if (node == null) {
synchronized (this) {
if (node == null) {
if (XMPPServer.getInstance().getPubSubModule().getServiceID().equals(serviceId))
{
node = (LeafNode) XMPPServer.getInstance().getPubSubModule().getNode(nodeId);
}
else
{
PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
node = serviceMgr.hasCachedService(new JID(serviceId)) ? (LeafNode) serviceMgr.getPEPService(
serviceId).getNode(nodeId) : null;
}
}
}
}
return node;
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
public PubSubInfo()
{
super( XMPPServer.getInstance().getPubSubModule() );
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
@Override
public Iterator<String> getFeatures(String name, String node, JID senderJID) {
if (node == null) {
PubSubModule pubsub = XMPPServer.getInstance().getPubSubModule();
return pubsub.getFeatures(null, null, senderJID);
} else {
List<String> features = new LinkedList<>();
features.add("http://jabber.org/protocol/pubsub");
return features.iterator();
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
/**
* Implements ServerFeaturesProvider to include all supported XEP-0060 features
* in the server's disco#info result (as per section 4 of XEP-0163).
*/
@Override
public Iterator<String> getFeatures() {
Iterator<String> it = XMPPServer.getInstance().getPubSubModule().getFeatures(null, null, null);
ArrayList<String> features = new ArrayList<>();
while (it.hasNext()) {
features.add(it.next());
}
// Auto Creation of nodes is supported in PEP
features.add("http://jabber.org/protocol/pubsub#auto-create");
return features.iterator();
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
public Node getNode()
{
if (node == null)
node = XMPPServer.getInstance().getPubSubModule().getNode(nodeId);
return node;
}
代码示例来源:origin: net.gltd.gtms/gtmsutil
public static boolean doesNodeExist(String interest) {
boolean result = false;
Node node = XMPPServer.getInstance().getPubSubModule().getNode(interest);
if (node != null) {
// already created
result = true;
}
return result;
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
public PubSubServiceInfo(PubSubService pubSubService) {
if (pubSubService == null) {
throw new IllegalArgumentException("Argument 'pubSubService' cannot be null.");
}
this.pubSubService = pubSubService;
xmppServer = XMPPServer.getInstance();
pubSubModule = xmppServer.getPubSubModule();
groupManager = GroupManager.getInstance();
userManager = xmppServer.getUserManager();
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
public PubSubService getService()
{
if (XMPPServer.getInstance().getPubSubModule().getServiceID().equals(serviceId))
return XMPPServer.getInstance().getPubSubModule();
else
{
PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
return serviceMgr.hasCachedService(new JID(serviceId)) ? serviceMgr.getPEPService(serviceId) : null;
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
@Override
public Iterator<Element> getIdentities(String name, String node, JID senderJID) {
String recipientJID = XMPPServer.getInstance().createJID(name, null, true).toBareJID();
PEPService pepService = pepServiceManager.getPEPService(recipientJID);
if (node != null && pepService != null) {
Node pubNode = pepService.getNode(node);
if (pubNode == null) return null;
// Answer the identity of a given node
Element identity = DocumentHelper.createElement("identity");
identity.addAttribute("category", "pubsub");
identity.addAttribute("type", pubNode.isCollectionNode() ? "collection" : "leaf");
List<Element> identities = new LinkedList<>();
identities.add(identity);
return identities.iterator();
} else if (node != null) {
return null;
} else {
PubSubModule pubsub = XMPPServer.getInstance().getPubSubModule();
return pubsub.getIdentities(null, null, senderJID);
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
/**
* Returns the {@link LeafNode} where this item was published.
*
* @return the leaf node where this item was published.
*/
public LeafNode getNode() {
if (node == null) {
synchronized (this) {
if (node == null) {
if (XMPPServer.getInstance().getPubSubModule().getServiceID().equals(serviceId))
{
node = (LeafNode) XMPPServer.getInstance().getPubSubModule().getNode(nodeId);
}
else
{
PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
node = serviceMgr.hasCachedService(new JID(serviceId)) ? (LeafNode) serviceMgr.getPEPService(
serviceId).getNode(nodeId) : null;
}
}
}
}
return node;
}
内容来源于网络,如有侵权,请联系作者删除!