* @return The list of publish-subscribe services.
* @throws rocks.xmpp.core.stanza.model.StanzaException If the server returned a stanza error.
* @throws rocks.xmpp.core.session.NoResponseException If the server did not respond.
*/
public Collection<PubSubService> getPubSubServices() throws XmppException {
ItemNode itemNode = serviceDiscoveryManager.discoverItems(null);
Collection<PubSubService> pubSubServices = new ArrayList<>();
for (Item item : itemNode.getItems()) {
InfoNode infoNode = serviceDiscoveryManager.discoverInformation(item.getJid());
if (infoNode.getFeatures().contains(new Feature(PubSub.NAMESPACE))) {
pubSubServices.add(new PubSubService(item.getJid(), xmppSession, serviceDiscoveryManager));
}
}