1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-14 09:01:08 +01:00

Improve PubSub API

Use Manager pattern for PubSubManager.

Also improve the API of ServiceDiscoverManager.
This commit is contained in:
Florian Schmaus 2015-05-12 17:56:06 +02:00
parent 9e351f0535
commit 001e824fb9
16 changed files with 368 additions and 140 deletions

View file

@ -283,11 +283,7 @@ public class MultipleRecipientManager {
*/
private static DomainBareJid getMultipleRecipienServiceAddress(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection);
List<DomainBareJid> services = sdm.findServices(MultipleAddresses.NAMESPACE, true, true);
if (services.size() > 0) {
return services.get(0);
}
return null;
return sdm.findService(MultipleAddresses.NAMESPACE, true);
}
/**