DiscoverItems items = disco.discoverItems(connection.getServiceName());
Iterator iter = items.getItems();
while (iter.hasNext()) {
DiscoverItems.Item item = (DiscoverItems.Item) iter.next();
DiscoverInfo info = disco.discoverInfo(item.getEntityID());
Iterator<DiscoverInfo.Identity> iter2 = info.getIdentities();
while (iter2.hasNext()) {
DiscoverInfo.Identity identity = iter2.next();
if (identity.getCategory().equals("proxy") && identity.getType().equals("stun"))
if (info.containsFeature(NAMESPACE))
return true;
}
LOGGER.debug(item.getName()+"-"+info.getType());
}
}
catch (XMPPException e) {
e.printStackTrace();