Class HttpLookupMethod

java.lang.Object
org.jivesoftware.smack.altconnections.HttpLookupMethod

public final class HttpLookupMethod extends Object
The HTTP lookup method uses web host metadata to list the URIs of alternative connection methods.

In order to obtain host-meta XRD element from the host in the form of an InputStream, use getXrdStream(DomainBareJid) method. To obtain endpoints for Bosh or Websocket connection endpoints from host, use HttpLookupMethod.LinkRelation.BOSH and HttpLookupMethod.LinkRelation.WEBSOCKET respectively with the lookup(DomainBareJid, LinkRelation) method. In case one is looking for endpoints described by other than BOSH or Websocket LinkRelation, use the more flexible lookup(DomainBareJid, String) method.

Example:
 
 DomainBareJid xmppServerAddress = JidCreate.domainBareFrom("example.org");
 List<URI> endpoints = HttpLookupMethod.lookup(xmppServiceAddress, LinkRelation.WEBSOCKET);
 
 
See Also: